if (self.CavalryLogger) { CavalryLogger.start_js(["iTate"]); } __d("ProductTaggingTranslations",["fbt"],(function(a,b,c,d,e,f,g){"use strict";a={getAddProductTitle:function(a){return a?g._("Add Product"):g._("New Product")},getAddProductSubtitle:function(a){return a?g._("Tag and add to your shop."):g._("Tag a new product in your posts.")}};e.exports=a}),null); __d("FBScrollbarsUtils",["cx","MultiKeyMap","once","resize-observer-polyfill"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=new(b("MultiKeyMap"))(),i=new(b("resize-observer-polyfill"))(function(a){a.forEach(function(a){a=a.target;if(!(a instanceof HTMLElement))return;var b=h.get([a,"vertical"]);a=h.get([a,"horizontal"]);b&&b();a&&a()})});g=function(a,b,c){i.observe(a);h.set([a,b],c);return{remove:function(){i.unobserve(a)}}};b=b("once")(function(){__p&&__p();var a=document.body;if(!(a instanceof HTMLElement))return!1;var b=document.createElement("div");b.style.position="fixed";b.style.top="-9999px";b.style.height="100px";b.style.width="100px";b.style.overflow="scroll";b.classList.add("_7304");a.appendChild(b);var c=b.offsetHeight===b.clientHeight;a.removeChild(b);return c});function a(a){a=a==="vertical"?"_72-2":"_72-4";return j("_72-1 "+a)}function c(a){a=a==="vertical"?"_72-0":"_72-3";return j("_72z_ "+a)}function j(a){var b=document.createElement("div");b.setAttribute("class",a);return b}var k;function d(){k==null&&(k=document.createElement("div"),k.style.position="fixed",k.style.top="0",k.style.right="0",k.style.bottom="0",k.style.left="0",k.style.cursor="grabbing"),document.body&&document.body.appendChild(k)}function f(){k!=null&&(document.body&&document.body.removeChild(k))}var l=function(a){return{offsetCoord:a.offsetY,pageCoord:a.pageY}},m=function(a){return{offsetCoord:a.offsetX,pageCoord:a.pageX}},n=function(a){return{clientSize:a.clientHeight,overflowProp:a.style.overflowY,scrollSize:a.scrollHeight,scrollProp:a.scrollTop,scrollPropMax:a.scrollHeight-a.clientHeight,sizeProp:"height"}},o=function(a){return{clientSize:a.clientWidth,overflowProp:a.style.overflowX,scrollSize:a.scrollWidth,scrollProp:a.scrollLeft,scrollPropMax:a.scrollWidth-a.clientWidth,sizeProp:"width"}},p=function(a,b){return a.scrollTop=b},q=function(a,b){return a.scrollLeft=b},r=function(a,b){return a.style.height=b+"px"},s=function(a,b){return a.style.width=b+"px"},t=function(a,b){return"translate3d("+b+"px, "+a+"px, 0)"},u=function(a,b){return"translate3d("+a+"px, "+b+"px, 0)"},v={getElementData:n,getEventData:l,setScrollProp:p,setSizeProp:r,translate3DMajorMinor:t},w={getElementData:o,getEventData:m,setScrollProp:q,setSizeProp:s,translate3DMajorMinor:u};n=function(a){return a==="vertical"?v:w};e.exports={addDraggingOverlay:d,addScrollingContainerResizeObserver:g,canHideScrollbars:b,getOrientedUtils:n,makeBar:a,makeTrack:c,removeDraggingOverlay:f}}),null); __d("EmojiPickerDispatcher",["ExplicitRegistrationReactDispatcher"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}var c=b.prototype;c.handleAction=function(a){this.dispatch(a)};return b}(b("ExplicitRegistrationReactDispatcher"));e.exports=new a({strict:!0})}),null); __d("EmojiPickerActions",["EmojiPickerDispatcher","keyMirror"],(function(a,b,c,d,e,f){"use strict";var g=b("keyMirror")({SET_EMOJI_CATEGORY_DATA:null,SET_RECENTLY_USED:null,SET_SEARCH:null,SET_SELECTED_CATEGORY:null}),h=babelHelpers["extends"]({},g,{setEmojiCategoryData:function(a){b("EmojiPickerDispatcher").dispatch({data:a,type:g.SET_EMOJI_CATEGORY_DATA})},setRecentlyUsed:function(a){b("EmojiPickerDispatcher").dispatch({emoji:a,type:h.SET_RECENTLY_USED})},setSearch:function(a){b("EmojiPickerDispatcher").dispatch({search:a,type:g.SET_SEARCH})},setSelectedCategory:function(a,c,d){b("EmojiPickerDispatcher").dispatch({doNotUpdateScrollPosition:c,loadedCategories:d,selectedCategoryIndex:a,type:h.SET_SELECTED_CATEGORY})}});e.exports=h}),null); __d("EmojiPickerCategories.react",["cx","EmojiPickerActions","React","TabBar.react","TabBarItem.react","joinClasses"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.$1=function(a){a=parseInt(a,10)||0;b("EmojiPickerActions").setSelectedCategory(a);return!1};d.render=function(){var a=this,c=this.props.categories.map(function(c,d){var e=d===a.props.selectedCategoryIndex;return b("React").createElement(b("TabBarItem.react"),{className:"_1ogy"+(e?" _1ogz":""),key:d+"",tabIndex:e?0:-1},b("React").createElement("span",{"aria-label":c.get("name"),className:b("joinClasses")("_1e8n",c.get("className"))}))});return b("React").createElement(b("TabBar.react"),{className:"_1og-"+(this.props.categories.size?"":" _1og_"),activeTabKey:this.props.selectedCategoryIndex+"",onTabClick:this.$1},c)};return c}(b("React").PureComponent);e.exports=a}),null); __d("EmojiPickerConfig",[],(function(a,b,c,d,e,f){"use strict";a=40;b=280;c=8;d=320;f=Math.floor(d/a);var g=Math.floor(b/a);e.exports={COLS:f,EMOJI_SIZE:a,HEIGHT:b,MAX_RECENTLY_USED:c,WIDTH:d,ROWS:g}}),null); __d("EmojiPickerButton.react",["ix","cx","EmojiPickerActions","FBEmojiResource","FBEmojiUtils","Image.react","Keys","React","clearTimeout","fbglyph","setTimeout"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("FBEmojiUtils").codepointsToString,j=b("FBEmojiUtils").getSupportedModifierSequences,k=28,l=1e3;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;g0;return b("React").createElement(b("ContextualLayer.react"),{context:e,position:"below",onBlur:this.props.onBlur,shown:"true"},b("React").createElement("div",{className:"_1pd4"},b("React").createElement("div",{className:"_5zgc",style:(c={},c[g?"top":"bottom"]="-100%",c.marginLeft=Math.min(0,h-f),c)},j),b("React").createElement("div",{className:"_3m-j"},b("React").createElement(b("EmojiPickerButton.react"),{codepoint:d,onClick:this.props.onBlur}))))};return c}(b("React").PureComponent);e.exports=a}),null); __d("EmojiFullPicker.react",["cx","Banzai","Ease","EmojiPickerActions","EmojiPickerCategories.react","EmojiPickerConfig","EmojiPickerGrid.react","EmojiPickerSearch.react","EmojiPickerSearchResults.react","EmojiPickerVariations.react","Event","Focus","Keys","LogicalGrid.react","React","ReactDOM","ScrollableArea.react","XUISpinner.react","gkx","throttle"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=b("Ease").makePowerInOut;var h=b("EmojiPickerConfig").COLS,i=b("EmojiPickerConfig").HEIGHT,j=b("EmojiPickerConfig").WIDTH,k={ease:a(3),duration:750};c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;g=a){m=Math.min(a+i,l+m)-Math.max(a,l);m>h&&(j=k,h=m);g.includes(k)||(g=g.push(k))}}typeof c==="number"&&((a>c&&j>f||a0}).map(function(c,d){var e=b("React").createElement(b("EmojiPickerGrid.react"),{category:c,key:d,loaded:f.includes(d),onSelect:a.$6,onLongPress:a.$3,startRow:l,ref:"category_"+d});d===k&&(o=l);l+=Math.ceil(c.get("emoji").size/h);return e});return b("React").createElement("div",{onKeyDown:this.$4,className:"_2znk"+(this.props.suppressShadow!==!0?" _80zh":"")+(this.props.padPicker===!0?" _85cl":"")},b("React").createElement(b("ScrollableArea.react"),{height:i+"px",onScroll:b("throttle")(this.$7),persistent:b("gkx")("708253"),shadow:!1,ref:function(b){a.$1=b&&b.getArea(),a.$2=a.$1&&a.$1.getScrollTop()},width:j},b("React").createElement("div",{className:"uiContextualLayerParent _2znm"},m,b("React").createElement(b("LogicalGrid.react"),{autofocus:!0,initialFocusCellCoordinate:[o,0],component:b("React").createElement("div",null)},n,e),this.$9())),b("React").createElement(b("EmojiPickerCategories.react"),{categories:this.props.categories,selectedCategoryIndex:this.props.selectedCategoryIndex}),this.$8())};return c}(b("React").PureComponent);c.defaultProps={scrollToSelectedCategory:!0};e.exports=c}),null); __d("XListOfEmojiCategoriesController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/emojicategorylist/",{})}),null); __d("EmojiPickerStore",["AsyncRequest","EmojiPickerActions","EmojiPickerConfig","EmojiPickerDispatcher","FBEmojiUtils","FluxReduceStore","ImmutableListWithV4Types","ImmutableRecordWithV4Types","XListOfEmojiCategoriesController"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("EmojiPickerConfig").COLS,h=b("EmojiPickerConfig").MAX_RECENTLY_USED,i=b("EmojiPickerConfig").ROWS;a=b("ImmutableRecordWithV4Types").Record;var j,k,l,m=8,n=3,o=a({className:"",emoji:b("ImmutableListWithV4Types")(),isRecentlyUsed:!1,localized_name:"",name:""}),p=a({categories:b("ImmutableListWithV4Types")(),loadedCategories:b("ImmutableListWithV4Types")(),scrollToSelectedCategory:!1,search:"",selectedCategoryIndex:0,suggestions:[]});c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.getInitialState=function(){return p()};d.reduce=function(a,c){__p&&__p();c=c;var d=a.get("loadedCategories");switch(c.type){case b("EmojiPickerActions").SET_SEARCH:var e=c.search;if(e==="")return a.set("search","").set("suggestions",[]);var f=e.trim().toLowerCase();if(f.lengthk[b].length)return 1;return k[b].length>k[a].length?-1:0});return a.set("search",e).set("suggestions",o.slice(0,m).map(function(a){return a.split("_").map(function(a){return parseInt(a,10)})}));case b("EmojiPickerActions").SET_RECENTLY_USED:e=j.findIndex(function(a){return a.get("isRecentlyUsed")});if(e<0)return a;o=j.get(e);if(o==null)return a;var q=b("FBEmojiUtils").getKeyFromCodepoints(c.emoji.map(function(a){return String.fromCodePoint(a)}));o=o.set("emoji",o.get("emoji").filter(function(a){a=b("FBEmojiUtils").getKeyFromCodepoints(a.codepoint.map(function(a){return String.fromCodePoint(a)}));return q!==a}).unshift({codepoint:c.emoji}).slice(0,h));j=j.set(e,o);return a.set("categories",j);case b("EmojiPickerActions").SET_SELECTED_CATEGORY:e=c.doNotUpdateScrollPosition;o=c.selectedCategoryIndex;d=c.loadedCategories||d;d.includes(o)||(d=d.push(o));return a.set("loadedCategories",d).set("scrollToSelectedCategory",!e).set("selectedCategoryIndex",o);case b("EmojiPickerActions").SET_EMOJI_CATEGORY_DATA:j=c.data;e=0;o=0;while(e<=g*i){d=d.push(o);c=j.get(o);c!=null&&(e+=c.get("emoji").size);o++}l=j.reduce(function(a,b){b.get("emoji").forEach(function(b){var c=b.codepoint;b=b.synonyms;b&&b.forEach(function(b){b=b.toLowerCase()+"@@";a[b]?a[b].push(c):a[b]=[c]})});return a},{});return a.set("categories",j).set("loadedCategories",d).set("selectedCategoryIndex",0);default:return a}};d.bootstrap=function(){!j&&!k&&(k=new(b("AsyncRequest"))().setURI(b("XListOfEmojiCategoriesController").getURIBuilder().getURI()).setMethod("GET").setReadOnly(!0).setHandler(function(a){a&&b("EmojiPickerActions").setEmojiCategoryData(b("ImmutableListWithV4Types")(a.payload.map(function(a){return o({className:a.className,emoji:b("ImmutableListWithV4Types")(a.emojis),isRecentlyUsed:a.isRecentlyUsed,localized_name:a.localized_name,name:a.name})})))}),k.send())};return c}(b("FluxReduceStore"));c.__moduleID=e.id;e.exports=new c(b("EmojiPickerDispatcher"))}),null); __d("EmojiPickerContainer.react",["EmojiConfig","EmojiFullPicker.react","EmojiPickerDispatcher","EmojiPickerStore","FluxContainer","React","emptyFunction"],(function(a,b,c,d,e,f){__p&&__p();a=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.UNSAFE_componentWillMount=function(){b("EmojiPickerDispatcher").explicitlyRegisterStores([b("EmojiPickerStore")]),b("EmojiPickerStore").bootstrap()};c.getStores=function(){return[b("EmojiPickerStore")]};c.calculateState=function(){var a=b("EmojiPickerStore").getState();return{categories:a.get("categories"),loadedCategories:a.get("loadedCategories"),scrollToSelectedCategory:a.get("scrollToSelectedCategory"),search:a.get("search"),selectedCategoryIndex:a.get("selectedCategoryIndex"),suggestions:a.get("suggestions")}};d.render=function(){return b("React").createElement(b("EmojiFullPicker.react"),babelHelpers["extends"]({},this.state,{showSearch:b("EmojiConfig").hasEmojiPickerSearch,suppressShadow:!0,onSelect:this.props.onSelect,onVariationsShown:this.props.onVariationsShown||b("emptyFunction"),padPicker:this.props.padPicker}))};return c}(b("React").Component);e.exports=b("FluxContainer").create(a,{pure:!0})}),null); __d("TokenizerExampleSearchSource",["AbstractSearchSource","CountryCodeMap","SearchableEntry","filterObject","forEachObject"],(function(a,b,c,d,e,f){__p&&__p();a=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.searchImpl=function(a,c){var d=[];if(a){var e=a.toLowerCase(),f=b("filterObject")(b("CountryCodeMap"),function(a){return a.toLowerCase().startsWith(e)}),g=0;b("forEachObject")(f,function(a,c){d.push(new(b("SearchableEntry"))({order:g++,photo:"/images/mobile/glyph/book_blue_s.png",subtitle:a,title:a,uniqueID:c}))})}c(d,a)};return c}(b("AbstractSearchSource"));e.exports=a}),null); __d("SphericalMediaPerformanceTypedLogger",["Banzai","GeneratedLoggerUtils","nullthrows"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(){this.$1={}}var c=a.prototype;c.log=function(){b("GeneratedLoggerUtils").log("logger:SphericalMediaPerformanceLoggerConfig",this.$1,b("Banzai").BASIC)};c.logVital=function(){b("GeneratedLoggerUtils").log("logger:SphericalMediaPerformanceLoggerConfig",this.$1,b("Banzai").VITAL)};c.logImmediately=function(){b("GeneratedLoggerUtils").log("logger:SphericalMediaPerformanceLoggerConfig",this.$1,{signal:!0})};c.clear=function(){this.$1={};return this};c.getData=function(){return babelHelpers["extends"]({},this.$1)};c.updateData=function(a){this.$1=babelHelpers["extends"]({},this.$1,a);return this};c.setComputationTimeMs=function(a){this.$1.computation_time_ms=a;return this};c.setEndTimestampS=function(a){this.$1.end_timestamp_s=a;return this};c.setEvent=function(a){this.$1.event=a;return this};c.setFallbackDuration=function(a){this.$1.fallback_duration=a;return this};c.setFallbackReason=function(a){this.$1.fallback_reason=a;return this};c.setNormalizedFrameTime=function(a){this.$1.normalized_frame_time=a;return this};c.setNumSpatialAudioStutters=function(a){this.$1.num_spatial_audio_stutters=a;return this};c.setProductName=function(a){this.$1.product_name=a;return this};c.setProjection=function(a){this.$1.projection=a;return this};c.setSpatialReactionsCacheUsed=function(a){this.$1.spatial_reactions_cache_used=a;return this};c.setSpatialReactionsClustersCount=function(a){this.$1.spatial_reactions_clusters_count=a;return this};c.setSpatialReactionsCount=function(a){this.$1.spatial_reactions_count=a;return this};c.setSphericalRendererSetupDuration=function(a){this.$1.spherical_renderer_setup_duration=a;return this};c.setStartTimestampS=function(a){this.$1.start_timestamp_s=a;return this};c.setTime=function(a){this.$1.time=a;return this};c.setVideoID=function(a){this.$1.video_id=a;return this};c.setWeight=function(a){this.$1.weight=a;return this};return a}();c={computation_time_ms:!0,end_timestamp_s:!0,event:!0,fallback_duration:!0,fallback_reason:!0,normalized_frame_time:!0,num_spatial_audio_stutters:!0,product_name:!0,projection:!0,spatial_reactions_cache_used:!0,spatial_reactions_clusters_count:!0,spatial_reactions_count:!0,spherical_renderer_setup_duration:!0,start_timestamp_s:!0,time:!0,video_id:!0,weight:!0};e.exports=a}),null); __d("VideoEditTypedLogger",["Banzai","GeneratedLoggerUtils","nullthrows"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(){this.$1={}}var c=a.prototype;c.log=function(){b("GeneratedLoggerUtils").log("logger:VideoEditLoggerConfig",this.$1,b("Banzai").BASIC)};c.logVital=function(){b("GeneratedLoggerUtils").log("logger:VideoEditLoggerConfig",this.$1,b("Banzai").VITAL)};c.logImmediately=function(){b("GeneratedLoggerUtils").log("logger:VideoEditLoggerConfig",this.$1,{signal:!0})};c.clear=function(){this.$1={};return this};c.getData=function(){return babelHelpers["extends"]({},this.$1)};c.updateData=function(a){this.$1=babelHelpers["extends"]({},this.$1,a);return this};c.setCaptionsCount=function(a){this.$1.captions_count=a;return this};c.setChangedTitle=function(a){this.$1.changed_title=a;return this};c.setEmbeddable=function(a){this.$1.embeddable=a;return this};c.setEvent=function(a){this.$1.event=a;return this};c.setExpirationTime=function(a){this.$1.expiration_time=a;return this};c.setExpirationType=function(a){this.$1.expiration_type=a;return this};c.setExpiredNow=function(a){this.$1.expired_now=a;return this};c.setFlow=function(a){this.$1.flow=a;return this};c.setHasContentCategoryChanged=function(a){this.$1.has_content_category_changed=a;return this};c.setHasContentTagsChanged=function(a){this.$1.has_content_tags_changed=a;return this};c.setPublishNow=function(a){this.$1.publish_now=a;return this};c.setSource=function(a){this.$1.source=a;return this};c.setTime=function(a){this.$1.time=a;return this};c.setVC=function(a){this.$1.vc=a;return this};c.setVideoID=function(a){this.$1.video_id=a;return this};c.setWeight=function(a){this.$1.weight=a;return this};c.updateExtraData=function(a){a=b("nullthrows")(b("GeneratedLoggerUtils").serializeMap(a));b("GeneratedLoggerUtils").checkExtraDataFieldNames(a,g);this.$1=babelHelpers["extends"]({},this.$1,a);return this};c.addToExtraData=function(a,b){var c={};c[a]=b;return this.updateExtraData(c)};return a}();var g={captions_count:!0,changed_title:!0,embeddable:!0,event:!0,expiration_time:!0,expiration_type:!0,expired_now:!0,flow:!0,has_content_category_changed:!0,has_content_tags_changed:!0,publish_now:!0,source:!0,time:!0,vc:!0,video_id:!0,weight:!0};e.exports=a}),null); __d("createExponentialMovingAverage",[],(function(a,b,c,d,e,f){__p&&__p();function a(a,b){b===void 0&&(b=0);var c=b;return function(b){return c+=a*(b-c)}}function g(a){return function(b){return 1-Math.exp(-b/a)}}function b(a,b){b===void 0&&(b=0);var c=b,d=g(a);return function(a,b){return c+=d(b)*(a-c)}}a.createContinuous=b;e.exports=a}),null); __d("VelocityTracker",["createExponentialMovingAverage","performanceNow"],(function(a,b,c,d,e,f){__p&&__p();a=function(){"use strict";__p&&__p();function a(a,c){a===void 0&&(a=50),c===void 0&&(c={x:0,y:0}),this.$5=c.x,this.$6=c.y,this.$1=b("performanceNow")(),this.$2=b("createExponentialMovingAverage").createContinuous(a,this.$5),this.$3=b("createExponentialMovingAverage").createContinuous(a,this.$6)}var c=a.prototype;c.update=function(a,c){var d=0;this.$4?(d=b("performanceNow")()-this.$1,d=this.updateVelocity((a-this.$4.x)*1e3/d,(c-this.$4.y)*1e3/d)):this.$1=b("performanceNow")();this.$4={x:a,y:c};return d};c.updateVelocity=function(a,c){var d=b("performanceNow")(),e=d-this.$1;this.$1=d;this.$5=this.$2(a,e);this.$6=this.$3(c,e);return e};c.getVelocityX=function(){return Math.trunc(this.$5)};c.getVelocityY=function(){return Math.trunc(this.$6)};c.getSpeed=function(){return Math.trunc(Math.sqrt(this.$5*this.$5+this.$6*this.$6))};return a}();e.exports=a}),null); __d("ReactTargetingTaggerStore.react",["ReactComposerStoreBase","ReactComposerTaggerActionType","ReactComposerTaggerType"],(function(a,b,c,d,e,f){__p&&__p();a=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;c=a.call(this,function(){var a={};a[b("ReactComposerTaggerType").TARGETING]={};return{taggersData:a,taggersSource:{}}},function(a){a.type===b("ReactComposerTaggerActionType").SET_TAGGER_DATA&&(d&&d.$ReactTargetingTaggerStore1(a))})||this;d=babelHelpers.assertThisInitialized(c);return c}var d=c.prototype;d.getTaggerData=function(a,b){return this.getComposerData(a).taggersData[b]};d.$ReactTargetingTaggerStore1=function(a){var b=this.getComposerData(a.composerID),c=Array.isArray(a.taggerData)?a.taggerData.slice():Object.assign({},a.taggerData);b.taggersData[a.taggerID]=c;this.emitChange(a.composerID)};return c}(b("ReactComposerStoreBase"));e.exports=new a()}),null); __d("XPagesGetTargetingMetadataController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/pages/targeting/metadata/",{})}),null); __d("ReactComposerTargetingUtils",["fbt","AsyncRequest","React","ReactComposerTaggerActions","ReactComposerTaggerStore","ReactComposerTaggerType","ReactTargetingTaggerStore.react","XPagesGetTargetingMetadataController","XUIText.react","curry","intlList"],(function(a,b,c,d,e,f,g){__p&&__p();var h={fetchMetadata:function(a,c,d){var e=b("XPagesGetTargetingMetadataController").getURIBuilder();new(b("AsyncRequest"))().setURI(e.getURI()).setMethod("POST").setReadOnly(!0).setData({page_id:c,target_spec:JSON.stringify(a)}).setHandler(b("curry")(this._onFetchMetadataHandler,d)).send()},_onFetchMetadataHandler:function(a,b){b=b.payload;var c=h.renderSentences(b.sentences);a(JSON.parse(b.target_spec),c,b.reach_estimate)},renderSentences:function(a){if(a==null)return null;a=a.map(function(a){return b("React").createElement("span",null,g._("{content_label} {children}",[g._param("content_label",b("React").createElement(b("XUIText.react"),{weight:"bold"},a.content)),g._param("children",b("intlList")(a.children,b("intlList").CONJUNCTIONS.OR))]))});return b("React").createElement("span",null,b("intlList")(a,b("intlList").CONJUNCTIONS.NONE))},getDataFromComposerTaggerStore:function(a){a=b("ReactComposerTaggerStore").getTaggerData(a,b("ReactComposerTaggerType").TARGETING);return a},getDataFromTargetingTaggerStore:function(a){return b("ReactTargetingTaggerStore.react").getTaggerData(a,b("ReactComposerTaggerType").TARGETING)},setData:function(a,c){var d={},e=["targeting","gating","hints","targetingSentences","gatingSentences","reachEstimate","videoCreatorTopFanPageID","woodhengeInfo","newsSubscribersInfo","lockPrivacy"];e.map(function(a){a in c&&(d[a]=c[a])});b("ReactComposerTaggerActions").setTaggerDataWithoutLogging(a,b("ReactComposerTaggerType").TARGETING,d)}};e.exports=h}),null); __d("easeInOutInterpolate",["invariant"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){a>=0&&a<=1||g(0,5633);return Math.cos((a+1)*Math.PI)/2+.5};e.exports=a}),null); __d("SphericalParallaxUtils",["easeInOutInterpolate"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=200,h=-100,i=g-h,j=45,k={getMinYawOffset:function(a,b,c,d){c=j*(c-h)/i;if(!a)return c;a=-a+b;if(d>180){b=-(360-d-c);return b>a?Math.abs(-(360-d)-a):c}else return d-c180)return c;a=a-b;if(d<180)return c+d>a?a-d:c;else return d-360+c>a?a-(d-360):c},calculateNewYaw:function(a,c,d,e,f,j){__p&&__p();e=k.getMinYawOffset(e,j,c,d);f=k.getMaxYawOffset(f,j,c,d);if(ag)return{yaw:f,success:!0};j=b("easeInOutInterpolate")((a-h)/i)*i+h;if(j>=h&&j<=g){j>c?a=d+f*((j-c)/(g-c)):a=d-e+e*(j-h)/(c-h);if(a<=d+f&&a>=d-e)return{yaw:a,success:!0}}return{yaw:0,success:!1}},calculateYawOffset:function(a,b,c,d){return k.calculateNewYaw(a,50,0,b,c,d)}};e.exports=k}),null); __d("ProgressiveDateAndTimePicker.react",["cx","fbt","InlineBlock.react","React","XUIProgressiveDatepicker.react","XUISelector.react","formatDate"],(function(a,b,c,d,e,f,g,h){__p&&__p();var i=b("XUISelector.react").Option;a=b("React").PropTypes;c=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var b,c;for(var d=arguments.length,e=new Array(d),f=0;f0&&(g=e);d.push(b("React").createElement(i,{key:e,value:e},g));this.state.minute===e&&(f=e)}c=b("React").createElement(b("XUISelector.react"),{className:"_5vu1",disabled:this.state.hour==-1,maxheight:this.props.menuMaxHeight,name:this.props.inputPrefix+"_minute",onChange:this.onMinuteChange,value:f},d)}return b("React").createElement(b("InlineBlock.react"),{className:this.props.className},b("React").createElement(b("XUIProgressiveDatepicker.react"),babelHelpers["extends"]({},this.props,{setDateTo:this.state.datePickerResult,onDateChange:this.onDateChange})),a,c)};return c}(b("React").Component);c.propTypes=babelHelpers["extends"]({},b("XUIProgressiveDatepicker.react").propTypes,{initialHour:a.number,initialMinute:a.number});c.defaultProps={initialYear:0,initialMonth:0,initialDay:0,initialHour:-1,initialMinute:-1,maxTime:Date.now()/1e3,minTime:new Date(1906,0,0,0,0).getTime()/1e3};e.exports=c}),null); __d("SphericalVideoComponentDispatcher",["ExplicitRegistrationReactDispatcher"],(function(a,b,c,d,e,f){"use strict";a=function(a){babelHelpers.inheritsLoose(b,a);function b(b){b=a.call(this,b)||this;babelHelpers.assertThisInitialized(b).dispatch=b.dispatch.bind(babelHelpers.assertThisInitialized(b));return b}return b}(b("ExplicitRegistrationReactDispatcher"));e.exports=new a({strict:!0})}),null); __d("SphericalVideoComponentActions",["SphericalVideoComponentDispatcher"],(function(a,b,c,d,e,f){__p&&__p();a={registerVideoPlayerController:function(a){a={type:"SphericalVideoComponent/registerVideoPlayerController",controller:a,id:a.getVideoPlayerID()};b("SphericalVideoComponentDispatcher").dispatch(a)},updateVideoPlayerState:function(a,c){a={type:"SphericalVideoComponent/updateVideoPlayerState",id:a,state:c};b("SphericalVideoComponentDispatcher").dispatch(a)},togglePlay:function(a,c){a={type:"SphericalVideoComponent/togglePlay",id:a,nextIsPlaying:c};b("SphericalVideoComponentDispatcher").dispatch(a)},toggleChannelView:function(a,c){a={type:"SphericalVideoComponent/toggleChannelView",id:a,isInChannelView:c};b("SphericalVideoComponentDispatcher").dispatch(a)},toggleTahoe:function(a,c){a={type:"SphericalVideoComponent/toggleTahoe",id:a,isInTahoe:c};b("SphericalVideoComponentDispatcher").dispatch(a)},setCurrentVideoTime:function(a,c){a={type:"SphericalVideoComponent/setCurrentPlaytime",id:a,time:c};b("SphericalVideoComponentDispatcher").dispatch(a)},setVideoDuration:function(a,c){a={type:"SphericalVideoComponent/setVideoDuration",id:a,durationSeconds:c};b("SphericalVideoComponentDispatcher").dispatch(a)},seekStart:function(a){a={type:"SphericalVideoComponent/seekStart",id:a};b("SphericalVideoComponentDispatcher").dispatch(a)},registerSphericalViewportControl:function(a,c,d){a={type:"SphericalVideoComponent/registerSphericalViewportControl",id:a,sphericalViewportControl:c,viewport:d};b("SphericalVideoComponentDispatcher").dispatch(a)},changeViewport:function(a,c,d,e){a={type:"SphericalVideoComponent/changeViewport",id:a,yaw:c,pitch:d,fieldOfView:e};b("SphericalVideoComponentDispatcher").dispatch(a)},toggleViewportGrabbed:function(a){a={type:"SphericalVideoComponent/toggleViewportGrabbed",id:a};b("SphericalVideoComponentDispatcher").dispatch(a)},updateViewportDimensions:function(a,c,d){a={type:"SphericalVideoComponent/updateViewportDimensions",id:a,width:c,height:d};b("SphericalVideoComponentDispatcher").dispatch(a)},setUserIsInactive:function(a){a={type:"SphericalVideoComponent/setUserIsInactive",id:a};b("SphericalVideoComponentDispatcher").dispatch(a)},setInitialViewport:function(a,c,d){a={type:"SphericalVideoComponent/setInitialViewport",id:a,yaw:c,pitch:d};b("SphericalVideoComponentDispatcher").dispatch(a)}};e.exports=a}),null); __d("SphericalVideoComponentConstants",[],(function(a,b,c,d,e,f){a={ACTIONS:{REGISTER_VIDEO_PLAYER_CONTROLLER:"SphericalVideoComponent/registerVideoPlayerController",UPDATE_VIDEO_PLAYER_STATE:"SphericalVideoComponent/updateVideoPlayerState",TOGGLE_PLAY:"SphericalVideoComponent/togglePlay",SET_CURRENT_PLAY_TIME:"SphericalVideoComponent/setCurrentPlaytime",SET_VIDEO_DURATION:"SphericalVideoComponent/setVideoDuration",TOGGLE_CHANNEL_VIEW:"SphericalVideoComponent/toggleChannelView",TOGGLE_TAHOE:"SphericalVideoComponent/toggleTahoe",SEEK_START:"SphericalVideoComponent/seekStart",REGISTER_SPHERICAL_VIEWPORT_CONTROL:"SphericalVideoComponent/registerSphericalViewportControl",CHANGE_VIEWPORT:"SphericalVideoComponent/changeViewport",TOGGLE_VIEWPORT_GRABBED:"SphericalVideoComponent/toggleViewportGrabbed",UPDATE_VIEWPORT_DIMENSIONS:"SphericalVideoComponent/updateViewportDimensions",SET_USER_IS_INACTIVE:"SphericalVideoComponent/setUserIsInactive",SET_INITIAL_VIEWPORT:"SphericalVideoComponent/setInitialViewport"}};e.exports=a}),null); __d("degToRad",[],(function(a,b,c,d,e,f){"use strict";function a(a){return a*Math.PI/180}e.exports=a}),null); /** * License: https://www.facebook.com/legal/license/MDzNl_j9yvg/ */ __d("gl-matrix-3.0.0",[],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g={},h={exports:g};function i(){__p&&__p();Object.defineProperty(g,"__esModule",{value:!0});g.setMatrixArrayType=b;g.toRadian=d;g.equals=e;g.RANDOM=g.ARRAY_TYPE=g.EPSILON=void 0;var a=1e-6;g.EPSILON=a;b=typeof Float32Array!=="undefined"?Float32Array:Array;g.ARRAY_TYPE=b;d=Math.random;g.RANDOM=d;function b(a){g.ARRAY_TYPE=a}var c=Math.PI/180;function d(a){return a*c}function e(b,c){return Math.abs(b-c)<=a*Math.max(1,Math.abs(b),Math.abs(c))}}var j=!1,k=function(){j||(j=!0,i());return h.exports},l={},m={exports:l};function n(){__p&&__p();Object.defineProperty(l,"__esModule",{value:!0});l.create=c;l.clone=d;l.copy=e;l.identity=f;l.fromValues=g;l.set=h;l.transpose=i;l.invert=j;l.adjoint=m;l.determinant=n;l.multiply=o;l.rotate=p;l.scale=q;l.fromRotation=r;l.fromScaling=s;l.str=t;l.frob=u;l.LDU=v;l.add=w;l.subtract=x;l.exactEquals=y;l.equals=z;l.multiplyScalar=A;l.multiplyScalarAndAdd=B;l.sub=l.mul=void 0;var a=b(k());function b(a){__p&&__p();if(a&&a.__esModule)return a;else{var b={};if(a!=null)for(var c in a)if(Object.prototype.hasOwnProperty.call(a,c)){var d=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(a,c):{};d.get||d.set?Object.defineProperty(b,c,d):b[c]=a[c]}b["default"]=a;return b}}function c(){var b=new a.ARRAY_TYPE(4);a.ARRAY_TYPE!=Float32Array&&(b[1]=0,b[2]=0);b[0]=1;b[3]=1;return b}function d(b){var c=new a.ARRAY_TYPE(4);c[0]=b[0];c[1]=b[1];c[2]=b[2];c[3]=b[3];return c}function e(a,b){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];return a}function f(a){a[0]=1;a[1]=0;a[2]=0;a[3]=1;return a}function g(b,c,d,e){var f=new a.ARRAY_TYPE(4);f[0]=b;f[1]=c;f[2]=d;f[3]=e;return f}function h(a,b,c,d,e){a[0]=b;a[1]=c;a[2]=d;a[3]=e;return a}function i(a,b){if(a===b){var c=b[1];a[1]=b[2];a[2]=c}else a[0]=b[0],a[1]=b[2],a[2]=b[1],a[3]=b[3];return a}function j(a,b){__p&&__p();var c=b[0],d=b[1],e=b[2];b=b[3];var f=c*b-e*d;if(!f)return null;f=1/f;a[0]=b*f;a[1]=-d*f;a[2]=-e*f;a[3]=c*f;return a}function m(a,b){var c=b[0];a[0]=b[3];a[1]=-b[1];a[2]=-b[2];a[3]=c;return a}function n(a){return a[0]*a[3]-a[2]*a[1]}function o(a,b,c){var d=b[0],e=b[1],f=b[2];b=b[3];var g=c[0],h=c[1],i=c[2];c=c[3];a[0]=d*g+f*h;a[1]=e*g+b*h;a[2]=d*i+f*c;a[3]=e*i+b*c;return a}function p(a,b,c){var d=b[0],e=b[1],f=b[2];b=b[3];var g=Math.sin(c);c=Math.cos(c);a[0]=d*c+f*g;a[1]=e*c+b*g;a[2]=d*-g+f*c;a[3]=e*-g+b*c;return a}function q(a,b,c){var d=b[0],e=b[1],f=b[2];b=b[3];var g=c[0];c=c[1];a[0]=d*g;a[1]=e*g;a[2]=f*c;a[3]=b*c;return a}function r(a,b){var c=Math.sin(b);b=Math.cos(b);a[0]=b;a[1]=c;a[2]=-c;a[3]=b;return a}function s(a,b){a[0]=b[0];a[1]=0;a[2]=0;a[3]=b[1];return a}function t(a){return"mat2("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+")"}function u(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2)+Math.pow(a[2],2)+Math.pow(a[3],2))}function v(a,b,c,d){a[2]=d[2]/d[0];c[0]=d[0];c[1]=d[1];c[3]=d[3]-a[2]*c[1];return[a,b,c]}function w(a,b,c){a[0]=b[0]+c[0];a[1]=b[1]+c[1];a[2]=b[2]+c[2];a[3]=b[3]+c[3];return a}function x(a,b,c){a[0]=b[0]-c[0];a[1]=b[1]-c[1];a[2]=b[2]-c[2];a[3]=b[3]-c[3];return a}function y(a,b){return a[0]===b[0]&&a[1]===b[1]&&a[2]===b[2]&&a[3]===b[3]}function z(b,c){var d=b[0],e=b[1],f=b[2];b=b[3];var g=c[0],h=c[1],i=c[2];c=c[3];return Math.abs(d-g)<=a.EPSILON*Math.max(1,Math.abs(d),Math.abs(g))&&Math.abs(e-h)<=a.EPSILON*Math.max(1,Math.abs(e),Math.abs(h))&&Math.abs(f-i)<=a.EPSILON*Math.max(1,Math.abs(f),Math.abs(i))&&Math.abs(b-c)<=a.EPSILON*Math.max(1,Math.abs(b),Math.abs(c))}function A(a,b,c){a[0]=b[0]*c;a[1]=b[1]*c;a[2]=b[2]*c;a[3]=b[3]*c;return a}function B(b,c,d,a){b[0]=c[0]+d[0]*a;b[1]=c[1]+d[1]*a;b[2]=c[2]+d[2]*a;b[3]=c[3]+d[3]*a;return b}c=o;l.mul=c;d=x;l.sub=d}var o=!1,p=function(){o||(o=!0,n());return m.exports},q={},r={exports:q};function s(){__p&&__p();Object.defineProperty(q,"__esModule",{value:!0});q.create=c;q.clone=d;q.copy=e;q.identity=f;q.fromValues=g;q.set=h;q.invert=i;q.determinant=j;q.multiply=l;q.rotate=m;q.scale=n;q.translate=o;q.fromRotation=p;q.fromScaling=r;q.fromTranslation=s;q.str=t;q.frob=u;q.add=v;q.subtract=w;q.multiplyScalar=x;q.multiplyScalarAndAdd=y;q.exactEquals=z;q.equals=A;q.sub=q.mul=void 0;var a=b(k());function b(a){__p&&__p();if(a&&a.__esModule)return a;else{var b={};if(a!=null)for(var c in a)if(Object.prototype.hasOwnProperty.call(a,c)){var d=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(a,c):{};d.get||d.set?Object.defineProperty(b,c,d):b[c]=a[c]}b["default"]=a;return b}}function c(){var b=new a.ARRAY_TYPE(6);a.ARRAY_TYPE!=Float32Array&&(b[1]=0,b[2]=0,b[4]=0,b[5]=0);b[0]=1;b[3]=1;return b}function d(b){var c=new a.ARRAY_TYPE(6);c[0]=b[0];c[1]=b[1];c[2]=b[2];c[3]=b[3];c[4]=b[4];c[5]=b[5];return c}function e(a,b){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];a[4]=b[4];a[5]=b[5];return a}function f(a){a[0]=1;a[1]=0;a[2]=0;a[3]=1;a[4]=0;a[5]=0;return a}function g(b,c,d,e,f,g){var h=new a.ARRAY_TYPE(6);h[0]=b;h[1]=c;h[2]=d;h[3]=e;h[4]=f;h[5]=g;return h}function h(a,b,c,d,e,f,g){a[0]=b;a[1]=c;a[2]=d;a[3]=e;a[4]=f;a[5]=g;return a}function i(a,b){__p&&__p();var c=b[0],d=b[1],e=b[2],f=b[3],g=b[4];b=b[5];var h=c*f-d*e;if(!h)return null;h=1/h;a[0]=f*h;a[1]=-d*h;a[2]=-e*h;a[3]=c*h;a[4]=(e*b-f*g)*h;a[5]=(d*g-c*b)*h;return a}function j(a){return a[0]*a[3]-a[1]*a[2]}function l(a,b,c){__p&&__p();var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4];b=b[5];var i=c[0],j=c[1],k=c[2],l=c[3],m=c[4];c=c[5];a[0]=d*i+f*j;a[1]=e*i+g*j;a[2]=d*k+f*l;a[3]=e*k+g*l;a[4]=d*m+f*c+h;a[5]=e*m+g*c+b;return a}function m(a,b,c){__p&&__p();var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4];b=b[5];var i=Math.sin(c);c=Math.cos(c);a[0]=d*c+f*i;a[1]=e*c+g*i;a[2]=d*-i+f*c;a[3]=e*-i+g*c;a[4]=h;a[5]=b;return a}function n(a,b,c){__p&&__p();var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4];b=b[5];var i=c[0];c=c[1];a[0]=d*i;a[1]=e*i;a[2]=f*c;a[3]=g*c;a[4]=h;a[5]=b;return a}function o(a,b,c){__p&&__p();var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4];b=b[5];var i=c[0];c=c[1];a[0]=d;a[1]=e;a[2]=f;a[3]=g;a[4]=d*i+f*c+h;a[5]=e*i+g*c+b;return a}function p(a,b){var c=Math.sin(b);b=Math.cos(b);a[0]=b;a[1]=c;a[2]=-c;a[3]=b;a[4]=0;a[5]=0;return a}function r(a,b){a[0]=b[0];a[1]=0;a[2]=0;a[3]=b[1];a[4]=0;a[5]=0;return a}function s(a,b){a[0]=1;a[1]=0;a[2]=0;a[3]=1;a[4]=b[0];a[5]=b[1];return a}function t(a){return"mat2d("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}function u(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2)+Math.pow(a[2],2)+Math.pow(a[3],2)+Math.pow(a[4],2)+Math.pow(a[5],2)+1)}function v(a,b,c){a[0]=b[0]+c[0];a[1]=b[1]+c[1];a[2]=b[2]+c[2];a[3]=b[3]+c[3];a[4]=b[4]+c[4];a[5]=b[5]+c[5];return a}function w(a,b,c){a[0]=b[0]-c[0];a[1]=b[1]-c[1];a[2]=b[2]-c[2];a[3]=b[3]-c[3];a[4]=b[4]-c[4];a[5]=b[5]-c[5];return a}function x(a,b,c){a[0]=b[0]*c;a[1]=b[1]*c;a[2]=b[2]*c;a[3]=b[3]*c;a[4]=b[4]*c;a[5]=b[5]*c;return a}function y(b,c,d,a){b[0]=c[0]+d[0]*a;b[1]=c[1]+d[1]*a;b[2]=c[2]+d[2]*a;b[3]=c[3]+d[3]*a;b[4]=c[4]+d[4]*a;b[5]=c[5]+d[5]*a;return b}function z(a,b){return a[0]===b[0]&&a[1]===b[1]&&a[2]===b[2]&&a[3]===b[3]&&a[4]===b[4]&&a[5]===b[5]}function A(b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4];b=b[5];var i=c[0],j=c[1],k=c[2],l=c[3],m=c[4];c=c[5];return Math.abs(d-i)<=a.EPSILON*Math.max(1,Math.abs(d),Math.abs(i))&&Math.abs(e-j)<=a.EPSILON*Math.max(1,Math.abs(e),Math.abs(j))&&Math.abs(f-k)<=a.EPSILON*Math.max(1,Math.abs(f),Math.abs(k))&&Math.abs(g-l)<=a.EPSILON*Math.max(1,Math.abs(g),Math.abs(l))&&Math.abs(h-m)<=a.EPSILON*Math.max(1,Math.abs(h),Math.abs(m))&&Math.abs(b-c)<=a.EPSILON*Math.max(1,Math.abs(b),Math.abs(c))}c=l;q.mul=c;d=w;q.sub=d}var t=!1,u=function(){t||(t=!0,s());return r.exports},v={},w={exports:v};function x(){__p&&__p();Object.defineProperty(v,"__esModule",{value:!0});v.create=c;v.fromMat4=d;v.clone=e;v.copy=f;v.fromValues=g;v.set=h;v.identity=i;v.transpose=j;v.invert=l;v.adjoint=m;v.determinant=n;v.multiply=o;v.translate=p;v.rotate=q;v.scale=r;v.fromTranslation=s;v.fromRotation=t;v.fromScaling=u;v.fromMat2d=w;v.fromQuat=x;v.normalFromMat4=y;v.projection=z;v.str=A;v.frob=B;v.add=C;v.subtract=D;v.multiplyScalar=E;v.multiplyScalarAndAdd=F;v.exactEquals=G;v.equals=H;v.sub=v.mul=void 0;var a=b(k());function b(a){__p&&__p();if(a&&a.__esModule)return a;else{var b={};if(a!=null)for(var c in a)if(Object.prototype.hasOwnProperty.call(a,c)){var d=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(a,c):{};d.get||d.set?Object.defineProperty(b,c,d):b[c]=a[c]}b["default"]=a;return b}}function c(){var b=new a.ARRAY_TYPE(9);a.ARRAY_TYPE!=Float32Array&&(b[1]=0,b[2]=0,b[3]=0,b[5]=0,b[6]=0,b[7]=0);b[0]=1;b[4]=1;b[8]=1;return b}function d(a,b){__p&&__p();a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[4];a[4]=b[5];a[5]=b[6];a[6]=b[8];a[7]=b[9];a[8]=b[10];return a}function e(b){__p&&__p();var c=new a.ARRAY_TYPE(9);c[0]=b[0];c[1]=b[1];c[2]=b[2];c[3]=b[3];c[4]=b[4];c[5]=b[5];c[6]=b[6];c[7]=b[7];c[8]=b[8];return c}function f(a,b){__p&&__p();a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];a[4]=b[4];a[5]=b[5];a[6]=b[6];a[7]=b[7];a[8]=b[8];return a}function g(b,c,d,e,f,g,h,i,j){__p&&__p();var k=new a.ARRAY_TYPE(9);k[0]=b;k[1]=c;k[2]=d;k[3]=e;k[4]=f;k[5]=g;k[6]=h;k[7]=i;k[8]=j;return k}function h(a,b,c,d,e,f,g,h,i,j){__p&&__p();a[0]=b;a[1]=c;a[2]=d;a[3]=e;a[4]=f;a[5]=g;a[6]=h;a[7]=i;a[8]=j;return a}function i(a){__p&&__p();a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=1;a[5]=0;a[6]=0;a[7]=0;a[8]=1;return a}function j(a,b){__p&&__p();if(a===b){var c=b[1],d=b[2],e=b[5];a[1]=b[3];a[2]=b[6];a[3]=c;a[5]=b[7];a[6]=d;a[7]=e}else a[0]=b[0],a[1]=b[3],a[2]=b[6],a[3]=b[1],a[4]=b[4],a[5]=b[7],a[6]=b[2],a[7]=b[5],a[8]=b[8];return a}function l(a,b){__p&&__p();var c=b[0],d=b[1],e=b[2],f=b[3],g=b[4],h=b[5],i=b[6],j=b[7];b=b[8];var k=b*g-h*j,l=-b*f+h*i,m=j*f-g*i,n=c*k+d*l+e*m;if(!n)return null;n=1/n;a[0]=k*n;a[1]=(-b*d+e*j)*n;a[2]=(h*d-e*g)*n;a[3]=l*n;a[4]=(b*c-e*i)*n;a[5]=(-h*c+e*f)*n;a[6]=m*n;a[7]=(-j*c+d*i)*n;a[8]=(g*c-d*f)*n;return a}function m(a,b){__p&&__p();var c=b[0],d=b[1],e=b[2],f=b[3],g=b[4],h=b[5],i=b[6],j=b[7];b=b[8];a[0]=g*b-h*j;a[1]=e*j-d*b;a[2]=d*h-e*g;a[3]=h*i-f*b;a[4]=c*b-e*i;a[5]=e*f-c*h;a[6]=f*j-g*i;a[7]=d*i-c*j;a[8]=c*g-d*f;return a}function n(a){var b=a[0],c=a[1],d=a[2],e=a[3],f=a[4],g=a[5],h=a[6],i=a[7];a=a[8];return b*(a*f-g*i)+c*(-a*e+g*h)+d*(i*e-f*h)}function o(a,b,c){__p&&__p();var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],i=b[5],j=b[6],k=b[7];b=b[8];var l=c[0],m=c[1],n=c[2],o=c[3],p=c[4],q=c[5],r=c[6],s=c[7];c=c[8];a[0]=l*d+m*g+n*j;a[1]=l*e+m*h+n*k;a[2]=l*f+m*i+n*b;a[3]=o*d+p*g+q*j;a[4]=o*e+p*h+q*k;a[5]=o*f+p*i+q*b;a[6]=r*d+s*g+c*j;a[7]=r*e+s*h+c*k;a[8]=r*f+s*i+c*b;return a}function p(a,b,c){__p&&__p();var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],i=b[5],j=b[6],k=b[7];b=b[8];var l=c[0];c=c[1];a[0]=d;a[1]=e;a[2]=f;a[3]=g;a[4]=h;a[5]=i;a[6]=l*d+c*g+j;a[7]=l*e+c*h+k;a[8]=l*f+c*i+b;return a}function q(a,b,c){__p&&__p();var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],i=b[5],j=b[6],k=b[7];b=b[8];var l=Math.sin(c);c=Math.cos(c);a[0]=c*d+l*g;a[1]=c*e+l*h;a[2]=c*f+l*i;a[3]=c*g-l*d;a[4]=c*h-l*e;a[5]=c*i-l*f;a[6]=j;a[7]=k;a[8]=b;return a}function r(a,b,c){__p&&__p();var d=c[0];c=c[1];a[0]=d*b[0];a[1]=d*b[1];a[2]=d*b[2];a[3]=c*b[3];a[4]=c*b[4];a[5]=c*b[5];a[6]=b[6];a[7]=b[7];a[8]=b[8];return a}function s(a,b){__p&&__p();a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=1;a[5]=0;a[6]=b[0];a[7]=b[1];a[8]=1;return a}function t(a,b){__p&&__p();var c=Math.sin(b);b=Math.cos(b);a[0]=b;a[1]=c;a[2]=0;a[3]=-c;a[4]=b;a[5]=0;a[6]=0;a[7]=0;a[8]=1;return a}function u(a,b){__p&&__p();a[0]=b[0];a[1]=0;a[2]=0;a[3]=0;a[4]=b[1];a[5]=0;a[6]=0;a[7]=0;a[8]=1;return a}function w(a,b){__p&&__p();a[0]=b[0];a[1]=b[1];a[2]=0;a[3]=b[2];a[4]=b[3];a[5]=0;a[6]=b[4];a[7]=b[5];a[8]=1;return a}function x(a,b){__p&&__p();var c=b[0],d=b[1],e=b[2];b=b[3];var f=c+c,g=d+d,h=e+e;c=c*f;var i=d*f;d=d*g;var j=e*f,k=e*g;e=e*h;f=b*f;g=b*g;b=b*h;a[0]=1-d-e;a[3]=i-b;a[6]=j+g;a[1]=i+b;a[4]=1-c-e;a[7]=k-f;a[2]=j-g;a[5]=k+f;a[8]=1-c-d;return a}function y(a,b){__p&&__p();var c=b[0],d=b[1],e=b[2],f=b[3],g=b[4],h=b[5],i=b[6],j=b[7],k=b[8],l=b[9],m=b[10],n=b[11],o=b[12],p=b[13],q=b[14];b=b[15];var r=c*h-d*g,s=c*i-e*g,t=c*j-f*g,u=d*i-e*h,v=d*j-f*h,w=e*j-f*i,x=k*p-l*o,y=k*q-m*o;k=k*b-n*o;var z=l*q-m*p;l=l*b-n*p;m=m*b-n*q;n=r*m-s*l+t*z+u*k-v*y+w*x;if(!n)return null;n=1/n;a[0]=(h*m-i*l+j*z)*n;a[1]=(i*k-g*m-j*y)*n;a[2]=(g*l-h*k+j*x)*n;a[3]=(e*l-d*m-f*z)*n;a[4]=(c*m-e*k+f*y)*n;a[5]=(d*k-c*l-f*x)*n;a[6]=(p*w-q*v+b*u)*n;a[7]=(q*t-o*w-b*s)*n;a[8]=(o*v-p*t+b*r)*n;return a}function z(a,b,c){__p&&__p();a[0]=2/b;a[1]=0;a[2]=0;a[3]=0;a[4]=-2/c;a[5]=0;a[6]=-1;a[7]=1;a[8]=1;return a}function A(a){return"mat3("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+")"}function B(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2)+Math.pow(a[2],2)+Math.pow(a[3],2)+Math.pow(a[4],2)+Math.pow(a[5],2)+Math.pow(a[6],2)+Math.pow(a[7],2)+Math.pow(a[8],2))}function C(a,b,c){__p&&__p();a[0]=b[0]+c[0];a[1]=b[1]+c[1];a[2]=b[2]+c[2];a[3]=b[3]+c[3];a[4]=b[4]+c[4];a[5]=b[5]+c[5];a[6]=b[6]+c[6];a[7]=b[7]+c[7];a[8]=b[8]+c[8];return a}function D(a,b,c){__p&&__p();a[0]=b[0]-c[0];a[1]=b[1]-c[1];a[2]=b[2]-c[2];a[3]=b[3]-c[3];a[4]=b[4]-c[4];a[5]=b[5]-c[5];a[6]=b[6]-c[6];a[7]=b[7]-c[7];a[8]=b[8]-c[8];return a}function E(a,b,c){__p&&__p();a[0]=b[0]*c;a[1]=b[1]*c;a[2]=b[2]*c;a[3]=b[3]*c;a[4]=b[4]*c;a[5]=b[5]*c;a[6]=b[6]*c;a[7]=b[7]*c;a[8]=b[8]*c;return a}function F(b,c,d,a){__p&&__p();b[0]=c[0]+d[0]*a;b[1]=c[1]+d[1]*a;b[2]=c[2]+d[2]*a;b[3]=c[3]+d[3]*a;b[4]=c[4]+d[4]*a;b[5]=c[5]+d[5]*a;b[6]=c[6]+d[6]*a;b[7]=c[7]+d[7]*a;b[8]=c[8]+d[8]*a;return b}function G(a,b){return a[0]===b[0]&&a[1]===b[1]&&a[2]===b[2]&&a[3]===b[3]&&a[4]===b[4]&&a[5]===b[5]&&a[6]===b[6]&&a[7]===b[7]&&a[8]===b[8]}function H(b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],i=b[5],j=b[6],k=b[7];b=b[8];var l=c[0],m=c[1],n=c[2],o=c[3],p=c[4],q=c[5],r=c[6],s=c[7];c=c[8];return Math.abs(d-l)<=a.EPSILON*Math.max(1,Math.abs(d),Math.abs(l))&&Math.abs(e-m)<=a.EPSILON*Math.max(1,Math.abs(e),Math.abs(m))&&Math.abs(f-n)<=a.EPSILON*Math.max(1,Math.abs(f),Math.abs(n))&&Math.abs(g-o)<=a.EPSILON*Math.max(1,Math.abs(g),Math.abs(o))&&Math.abs(h-p)<=a.EPSILON*Math.max(1,Math.abs(h),Math.abs(p))&&Math.abs(i-q)<=a.EPSILON*Math.max(1,Math.abs(i),Math.abs(q))&&Math.abs(j-r)<=a.EPSILON*Math.max(1,Math.abs(j),Math.abs(r))&&Math.abs(k-s)<=a.EPSILON*Math.max(1,Math.abs(k),Math.abs(s))&&Math.abs(b-c)<=a.EPSILON*Math.max(1,Math.abs(b),Math.abs(c))}c=o;v.mul=c;d=D;v.sub=d}var y=!1,z=function(){y||(y=!0,x());return w.exports},A={},B={exports:A};function C(){__p&&__p();Object.defineProperty(A,"__esModule",{value:!0});A.create=c;A.clone=d;A.copy=e;A.fromValues=f;A.set=g;A.identity=h;A.transpose=i;A.invert=j;A.adjoint=l;A.determinant=m;A.multiply=n;A.translate=o;A.scale=p;A.rotate=q;A.rotateX=r;A.rotateY=s;A.rotateZ=t;A.fromTranslation=u;A.fromScaling=v;A.fromRotation=w;A.fromXRotation=x;A.fromYRotation=y;A.fromZRotation=z;A.fromRotationTranslation=B;A.fromQuat2=C;A.getTranslation=D;A.getScaling=E;A.getRotation=F;A.fromRotationTranslationScale=G;A.fromRotationTranslationScaleOrigin=H;A.fromQuat=I;A.frustum=J;A.perspective=K;A.perspectiveFromFieldOfView=L;A.ortho=M;A.lookAt=N;A.targetTo=O;A.str=P;A.frob=Q;A.add=R;A.subtract=S;A.multiplyScalar=T;A.multiplyScalarAndAdd=U;A.exactEquals=V;A.equals=W;A.sub=A.mul=void 0;var a=b(k());function b(a){__p&&__p();if(a&&a.__esModule)return a;else{var b={};if(a!=null)for(var c in a)if(Object.prototype.hasOwnProperty.call(a,c)){var d=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(a,c):{};d.get||d.set?Object.defineProperty(b,c,d):b[c]=a[c]}b["default"]=a;return b}}function c(){var b=new a.ARRAY_TYPE(16);a.ARRAY_TYPE!=Float32Array&&(b[1]=0,b[2]=0,b[3]=0,b[4]=0,b[6]=0,b[7]=0,b[8]=0,b[9]=0,b[11]=0,b[12]=0,b[13]=0,b[14]=0);b[0]=1;b[5]=1;b[10]=1;b[15]=1;return b}function d(b){__p&&__p();var c=new a.ARRAY_TYPE(16);c[0]=b[0];c[1]=b[1];c[2]=b[2];c[3]=b[3];c[4]=b[4];c[5]=b[5];c[6]=b[6];c[7]=b[7];c[8]=b[8];c[9]=b[9];c[10]=b[10];c[11]=b[11];c[12]=b[12];c[13]=b[13];c[14]=b[14];c[15]=b[15];return c}function e(a,b){__p&&__p();a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];a[4]=b[4];a[5]=b[5];a[6]=b[6];a[7]=b[7];a[8]=b[8];a[9]=b[9];a[10]=b[10];a[11]=b[11];a[12]=b[12];a[13]=b[13];a[14]=b[14];a[15]=b[15];return a}function f(b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){__p&&__p();var r=new a.ARRAY_TYPE(16);r[0]=b;r[1]=c;r[2]=d;r[3]=e;r[4]=f;r[5]=g;r[6]=h;r[7]=i;r[8]=j;r[9]=k;r[10]=l;r[11]=m;r[12]=n;r[13]=o;r[14]=p;r[15]=q;return r}function g(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){__p&&__p();a[0]=b;a[1]=c;a[2]=d;a[3]=e;a[4]=f;a[5]=g;a[6]=h;a[7]=i;a[8]=j;a[9]=k;a[10]=l;a[11]=m;a[12]=n;a[13]=o;a[14]=p;a[15]=q;return a}function h(a){__p&&__p();a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a}function i(a,b){__p&&__p();if(a===b){var c=b[1],d=b[2],e=b[3],f=b[6],g=b[7],h=b[11];a[1]=b[4];a[2]=b[8];a[3]=b[12];a[4]=c;a[6]=b[9];a[7]=b[13];a[8]=d;a[9]=f;a[11]=b[14];a[12]=e;a[13]=g;a[14]=h}else a[0]=b[0],a[1]=b[4],a[2]=b[8],a[3]=b[12],a[4]=b[1],a[5]=b[5],a[6]=b[9],a[7]=b[13],a[8]=b[2],a[9]=b[6],a[10]=b[10],a[11]=b[14],a[12]=b[3],a[13]=b[7],a[14]=b[11],a[15]=b[15];return a}function j(a,b){__p&&__p();var c=b[0],d=b[1],e=b[2],f=b[3],g=b[4],h=b[5],i=b[6],j=b[7],k=b[8],l=b[9],m=b[10],n=b[11],o=b[12],p=b[13],q=b[14];b=b[15];var r=c*h-d*g,s=c*i-e*g,t=c*j-f*g,u=d*i-e*h,v=d*j-f*h,w=e*j-f*i,x=k*p-l*o,y=k*q-m*o,z=k*b-n*o,A=l*q-m*p,B=l*b-n*p,C=m*b-n*q,D=r*C-s*B+t*A+u*z-v*y+w*x;if(!D)return null;D=1/D;a[0]=(h*C-i*B+j*A)*D;a[1]=(e*B-d*C-f*A)*D;a[2]=(p*w-q*v+b*u)*D;a[3]=(m*v-l*w-n*u)*D;a[4]=(i*z-g*C-j*y)*D;a[5]=(c*C-e*z+f*y)*D;a[6]=(q*t-o*w-b*s)*D;a[7]=(k*w-m*t+n*s)*D;a[8]=(g*B-h*z+j*x)*D;a[9]=(d*z-c*B-f*x)*D;a[10]=(o*v-p*t+b*r)*D;a[11]=(l*t-k*v-n*r)*D;a[12]=(h*y-g*A-i*x)*D;a[13]=(c*A-d*y+e*x)*D;a[14]=(p*s-o*u-q*r)*D;a[15]=(k*u-l*s+m*r)*D;return a}function l(a,b){__p&&__p();var c=b[0],d=b[1],e=b[2],f=b[3],g=b[4],h=b[5],i=b[6],j=b[7],k=b[8],l=b[9],m=b[10],n=b[11],o=b[12],p=b[13],q=b[14];b=b[15];a[0]=h*(m*b-n*q)-l*(i*b-j*q)+p*(i*n-j*m);a[1]=-(d*(m*b-n*q)-l*(e*b-f*q)+p*(e*n-f*m));a[2]=d*(i*b-j*q)-h*(e*b-f*q)+p*(e*j-f*i);a[3]=-(d*(i*n-j*m)-h*(e*n-f*m)+l*(e*j-f*i));a[4]=-(g*(m*b-n*q)-k*(i*b-j*q)+o*(i*n-j*m));a[5]=c*(m*b-n*q)-k*(e*b-f*q)+o*(e*n-f*m);a[6]=-(c*(i*b-j*q)-g*(e*b-f*q)+o*(e*j-f*i));a[7]=c*(i*n-j*m)-g*(e*n-f*m)+k*(e*j-f*i);a[8]=g*(l*b-n*p)-k*(h*b-j*p)+o*(h*n-j*l);a[9]=-(c*(l*b-n*p)-k*(d*b-f*p)+o*(d*n-f*l));a[10]=c*(h*b-j*p)-g*(d*b-f*p)+o*(d*j-f*h);a[11]=-(c*(h*n-j*l)-g*(d*n-f*l)+k*(d*j-f*h));a[12]=-(g*(l*q-m*p)-k*(h*q-i*p)+o*(h*m-i*l));a[13]=c*(l*q-m*p)-k*(d*q-e*p)+o*(d*m-e*l);a[14]=-(c*(h*q-i*p)-g*(d*q-e*p)+o*(d*i-e*h));a[15]=c*(h*m-i*l)-g*(d*m-e*l)+k*(d*i-e*h);return a}function m(a){__p&&__p();var b=a[0],c=a[1],d=a[2],e=a[3],f=a[4],g=a[5],h=a[6],i=a[7],j=a[8],k=a[9],l=a[10],m=a[11],n=a[12],o=a[13],p=a[14];a=a[15];var q=b*g-c*f,r=b*h-d*f;b=b*i-e*f;f=c*h-d*g;c=c*i-e*g;g=d*i-e*h;d=j*o-k*n;i=j*p-l*n;e=j*a-m*n;h=k*p-l*o;j=k*a-m*o;n=l*a-m*p;return q*n-r*j+b*h+f*e-c*i+g*d}function n(a,b,c){__p&&__p();var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],i=b[5],j=b[6],k=b[7],l=b[8],m=b[9],n=b[10],o=b[11],p=b[12],q=b[13],r=b[14];b=b[15];var s=c[0],t=c[1],u=c[2],v=c[3];a[0]=s*d+t*h+u*l+v*p;a[1]=s*e+t*i+u*m+v*q;a[2]=s*f+t*j+u*n+v*r;a[3]=s*g+t*k+u*o+v*b;s=c[4];t=c[5];u=c[6];v=c[7];a[4]=s*d+t*h+u*l+v*p;a[5]=s*e+t*i+u*m+v*q;a[6]=s*f+t*j+u*n+v*r;a[7]=s*g+t*k+u*o+v*b;s=c[8];t=c[9];u=c[10];v=c[11];a[8]=s*d+t*h+u*l+v*p;a[9]=s*e+t*i+u*m+v*q;a[10]=s*f+t*j+u*n+v*r;a[11]=s*g+t*k+u*o+v*b;s=c[12];t=c[13];u=c[14];v=c[15];a[12]=s*d+t*h+u*l+v*p;a[13]=s*e+t*i+u*m+v*q;a[14]=s*f+t*j+u*n+v*r;a[15]=s*g+t*k+u*o+v*b;return a}function o(a,b,c){var d=c[0],e=c[1];c=c[2];var f,g,h,i,j,k,l,m,n,o,p,q;b===a?(a[12]=b[0]*d+b[4]*e+b[8]*c+b[12],a[13]=b[1]*d+b[5]*e+b[9]*c+b[13],a[14]=b[2]*d+b[6]*e+b[10]*c+b[14],a[15]=b[3]*d+b[7]*e+b[11]*c+b[15]):(f=b[0],g=b[1],h=b[2],i=b[3],j=b[4],k=b[5],l=b[6],m=b[7],n=b[8],o=b[9],p=b[10],q=b[11],a[0]=f,a[1]=g,a[2]=h,a[3]=i,a[4]=j,a[5]=k,a[6]=l,a[7]=m,a[8]=n,a[9]=o,a[10]=p,a[11]=q,a[12]=f*d+j*e+n*c+b[12],a[13]=g*d+k*e+o*c+b[13],a[14]=h*d+l*e+p*c+b[14],a[15]=i*d+m*e+q*c+b[15]);return a}function p(a,b,c){__p&&__p();var d=c[0],e=c[1];c=c[2];a[0]=b[0]*d;a[1]=b[1]*d;a[2]=b[2]*d;a[3]=b[3]*d;a[4]=b[4]*e;a[5]=b[5]*e;a[6]=b[6]*e;a[7]=b[7]*e;a[8]=b[8]*c;a[9]=b[9]*c;a[10]=b[10]*c;a[11]=b[11]*c;a[12]=b[12];a[13]=b[13];a[14]=b[14];a[15]=b[15];return a}function q(b,c,d,e){__p&&__p();var f=e[0],g=e[1];e=e[2];var h=Math.sqrt(f*f+g*g+e*e),i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B;if(h0?(d[0]=(i*h+l*e+j*g-k*f)*2/m,d[1]=(j*h+l*f+k*e-i*g)*2/m,d[2]=(k*h+l*g+i*f-j*e)*2/m):(d[0]=(i*h+l*e+j*g-k*f)*2,d[1]=(j*h+l*f+k*e-i*g)*2,d[2]=(k*h+l*g+i*f-j*e)*2);B(b,c,d);return b}function D(a,b){a[0]=b[12];a[1]=b[13];a[2]=b[14];return a}function E(a,b){var c=b[0],d=b[1],e=b[2],f=b[4],g=b[5],h=b[6],i=b[8],j=b[9];b=b[10];a[0]=Math.sqrt(c*c+d*d+e*e);a[1]=Math.sqrt(f*f+g*g+h*h);a[2]=Math.sqrt(i*i+j*j+b*b);return a}function F(a,b){var c=b[0]+b[5]+b[10];c>0?(c=Math.sqrt(c+1)*2,a[3]=.25*c,a[0]=(b[6]-b[9])/c,a[1]=(b[8]-b[2])/c,a[2]=(b[1]-b[4])/c):b[0]>b[5]&&b[0]>b[10]?(c=Math.sqrt(1+b[0]-b[5]-b[10])*2,a[3]=(b[6]-b[9])/c,a[0]=.25*c,a[1]=(b[1]+b[4])/c,a[2]=(b[8]+b[2])/c):b[5]>b[10]?(c=Math.sqrt(1+b[5]-b[0]-b[10])*2,a[3]=(b[8]-b[2])/c,a[0]=(b[1]+b[4])/c,a[1]=.25*c,a[2]=(b[6]+b[9])/c):(c=Math.sqrt(1+b[10]-b[0]-b[5])*2,a[3]=(b[1]-b[4])/c,a[0]=(b[8]+b[2])/c,a[1]=(b[6]+b[9])/c,a[2]=.25*c);return a}function G(a,b,c,d){__p&&__p();var e=b[0],f=b[1],g=b[2];b=b[3];var h=e+e,i=f+f,j=g+g,k=e*h,l=e*i;e=e*j;var m=f*i;f=f*j;g=g*j;h=b*h;i=b*i;b=b*j;j=d[0];var n=d[1];d=d[2];a[0]=(1-(m+g))*j;a[1]=(l+b)*j;a[2]=(e-i)*j;a[3]=0;a[4]=(l-b)*n;a[5]=(1-(k+g))*n;a[6]=(f+h)*n;a[7]=0;a[8]=(e+i)*d;a[9]=(f-h)*d;a[10]=(1-(k+m))*d;a[11]=0;a[12]=c[0];a[13]=c[1];a[14]=c[2];a[15]=1;return a}function H(a,b,c,d,e){__p&&__p();var f=b[0],g=b[1],h=b[2];b=b[3];var i=f+f,j=g+g,k=h+h,l=f*i,m=f*j;f=f*k;var n=g*j;g=g*k;h=h*k;i=b*i;j=b*j;b=b*k;k=d[0];var o=d[1];d=d[2];var p=e[0],q=e[1];e=e[2];var r=(1-(n+h))*k,s=(m+b)*k;k=(f-j)*k;m=(m-b)*o;b=(1-(l+h))*o;h=(g+i)*o;o=(f+j)*d;f=(g-i)*d;j=(1-(l+n))*d;a[0]=r;a[1]=s;a[2]=k;a[3]=0;a[4]=m;a[5]=b;a[6]=h;a[7]=0;a[8]=o;a[9]=f;a[10]=j;a[11]=0;a[12]=c[0]+p-(r*p+m*q+o*e);a[13]=c[1]+q-(s*p+b*q+f*e);a[14]=c[2]+e-(k*p+h*q+j*e);a[15]=1;return a}function I(a,b){__p&&__p();var c=b[0],d=b[1],e=b[2];b=b[3];var f=c+c,g=d+d,h=e+e;c=c*f;var i=d*f;d=d*g;var j=e*f,k=e*g;e=e*h;f=b*f;g=b*g;b=b*h;a[0]=1-d-e;a[1]=i+b;a[2]=j-g;a[3]=0;a[4]=i-b;a[5]=1-c-e;a[6]=k+f;a[7]=0;a[8]=j+g;a[9]=k-f;a[10]=1-c-d;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a}function J(a,b,c,d,e,f,g){__p&&__p();var h=1/(c-b),i=1/(e-d),j=1/(f-g);a[0]=f*2*h;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=f*2*i;a[6]=0;a[7]=0;a[8]=(c+b)*h;a[9]=(e+d)*i;a[10]=(g+f)*j;a[11]=-1;a[12]=0;a[13]=0;a[14]=g*f*2*j;a[15]=0;return a}function K(a,b,c,d,e){__p&&__p();b=1/Math.tan(b/2);a[0]=b/c;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=b;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[11]=-1;a[12]=0;a[13]=0;a[15]=0;e!=null&&e!==Infinity?(c=1/(d-e),a[10]=(e+d)*c,a[14]=2*e*d*c):(a[10]=-1,a[14]=-2*d);return a}function L(a,b,c,d){__p&&__p();var e=Math.tan(b.upDegrees*Math.PI/180),f=Math.tan(b.downDegrees*Math.PI/180),g=Math.tan(b.leftDegrees*Math.PI/180);b=Math.tan(b.rightDegrees*Math.PI/180);var h=2/(g+b),i=2/(e+f);a[0]=h;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=i;a[6]=0;a[7]=0;a[8]=-((g-b)*h*.5);a[9]=(e-f)*i*.5;a[10]=d/(c-d);a[11]=-1;a[12]=0;a[13]=0;a[14]=d*c/(c-d);a[15]=0;return a}function M(a,b,c,d,e,f,g){__p&&__p();var h=1/(b-c),i=1/(d-e),j=1/(f-g);a[0]=-2*h;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=-2*i;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=2*j;a[11]=0;a[12]=(b+c)*h;a[13]=(e+d)*i;a[14]=(g+f)*j;a[15]=1;return a}function N(b,c,d,e){__p&&__p();var f,g,i,j,k=c[0],l=c[1];c=c[2];var m=e[0],n=e[1];e=e[2];var o=d[0],p=d[1];d=d[2];if(Math.abs(k-o)0&&(k=1/Math.sqrt(k),i*=k,j*=k,c*=k);var l=h*c-d*j;d=d*i-g*c;g=g*j-h*i;k=l*l+d*d+g*g;k>0&&(k=1/Math.sqrt(k),l*=k,d*=k,g*=k);a[0]=l;a[1]=d;a[2]=g;a[3]=0;a[4]=j*g-c*d;a[5]=c*l-i*g;a[6]=i*d-j*l;a[7]=0;a[8]=i;a[9]=j;a[10]=c;a[11]=0;a[12]=e;a[13]=f;a[14]=b;a[15]=1;return a}function P(a){return"mat4("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+", "+a[9]+", "+a[10]+", "+a[11]+", "+a[12]+", "+a[13]+", "+a[14]+", "+a[15]+")"}function Q(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2)+Math.pow(a[2],2)+Math.pow(a[3],2)+Math.pow(a[4],2)+Math.pow(a[5],2)+Math.pow(a[6],2)+Math.pow(a[7],2)+Math.pow(a[8],2)+Math.pow(a[9],2)+Math.pow(a[10],2)+Math.pow(a[11],2)+Math.pow(a[12],2)+Math.pow(a[13],2)+Math.pow(a[14],2)+Math.pow(a[15],2))}function R(a,b,c){__p&&__p();a[0]=b[0]+c[0];a[1]=b[1]+c[1];a[2]=b[2]+c[2];a[3]=b[3]+c[3];a[4]=b[4]+c[4];a[5]=b[5]+c[5];a[6]=b[6]+c[6];a[7]=b[7]+c[7];a[8]=b[8]+c[8];a[9]=b[9]+c[9];a[10]=b[10]+c[10];a[11]=b[11]+c[11];a[12]=b[12]+c[12];a[13]=b[13]+c[13];a[14]=b[14]+c[14];a[15]=b[15]+c[15];return a}function S(a,b,c){__p&&__p();a[0]=b[0]-c[0];a[1]=b[1]-c[1];a[2]=b[2]-c[2];a[3]=b[3]-c[3];a[4]=b[4]-c[4];a[5]=b[5]-c[5];a[6]=b[6]-c[6];a[7]=b[7]-c[7];a[8]=b[8]-c[8];a[9]=b[9]-c[9];a[10]=b[10]-c[10];a[11]=b[11]-c[11];a[12]=b[12]-c[12];a[13]=b[13]-c[13];a[14]=b[14]-c[14];a[15]=b[15]-c[15];return a}function T(a,b,c){__p&&__p();a[0]=b[0]*c;a[1]=b[1]*c;a[2]=b[2]*c;a[3]=b[3]*c;a[4]=b[4]*c;a[5]=b[5]*c;a[6]=b[6]*c;a[7]=b[7]*c;a[8]=b[8]*c;a[9]=b[9]*c;a[10]=b[10]*c;a[11]=b[11]*c;a[12]=b[12]*c;a[13]=b[13]*c;a[14]=b[14]*c;a[15]=b[15]*c;return a}function U(b,c,d,a){__p&&__p();b[0]=c[0]+d[0]*a;b[1]=c[1]+d[1]*a;b[2]=c[2]+d[2]*a;b[3]=c[3]+d[3]*a;b[4]=c[4]+d[4]*a;b[5]=c[5]+d[5]*a;b[6]=c[6]+d[6]*a;b[7]=c[7]+d[7]*a;b[8]=c[8]+d[8]*a;b[9]=c[9]+d[9]*a;b[10]=c[10]+d[10]*a;b[11]=c[11]+d[11]*a;b[12]=c[12]+d[12]*a;b[13]=c[13]+d[13]*a;b[14]=c[14]+d[14]*a;b[15]=c[15]+d[15]*a;return b}function V(a,b){return a[0]===b[0]&&a[1]===b[1]&&a[2]===b[2]&&a[3]===b[3]&&a[4]===b[4]&&a[5]===b[5]&&a[6]===b[6]&&a[7]===b[7]&&a[8]===b[8]&&a[9]===b[9]&&a[10]===b[10]&&a[11]===b[11]&&a[12]===b[12]&&a[13]===b[13]&&a[14]===b[14]&&a[15]===b[15]}function W(b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],i=b[5],j=b[6],k=b[7],l=b[8],m=b[9],n=b[10],o=b[11],p=b[12],q=b[13],r=b[14];b=b[15];var s=c[0],t=c[1],u=c[2],v=c[3],w=c[4],x=c[5],y=c[6],z=c[7],A=c[8],B=c[9],C=c[10],D=c[11],E=c[12],F=c[13],G=c[14];c=c[15];return Math.abs(d-s)<=a.EPSILON*Math.max(1,Math.abs(d),Math.abs(s))&&Math.abs(e-t)<=a.EPSILON*Math.max(1,Math.abs(e),Math.abs(t))&&Math.abs(f-u)<=a.EPSILON*Math.max(1,Math.abs(f),Math.abs(u))&&Math.abs(g-v)<=a.EPSILON*Math.max(1,Math.abs(g),Math.abs(v))&&Math.abs(h-w)<=a.EPSILON*Math.max(1,Math.abs(h),Math.abs(w))&&Math.abs(i-x)<=a.EPSILON*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(j-y)<=a.EPSILON*Math.max(1,Math.abs(j),Math.abs(y))&&Math.abs(k-z)<=a.EPSILON*Math.max(1,Math.abs(k),Math.abs(z))&&Math.abs(l-A)<=a.EPSILON*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(m-B)<=a.EPSILON*Math.max(1,Math.abs(m),Math.abs(B))&&Math.abs(n-C)<=a.EPSILON*Math.max(1,Math.abs(n),Math.abs(C))&&Math.abs(o-D)<=a.EPSILON*Math.max(1,Math.abs(o),Math.abs(D))&&Math.abs(p-E)<=a.EPSILON*Math.max(1,Math.abs(p),Math.abs(E))&&Math.abs(q-F)<=a.EPSILON*Math.max(1,Math.abs(q),Math.abs(F))&&Math.abs(r-G)<=a.EPSILON*Math.max(1,Math.abs(r),Math.abs(G))&&Math.abs(b-c)<=a.EPSILON*Math.max(1,Math.abs(b),Math.abs(c))}c=n;A.mul=c;d=S;A.sub=d}var D=!1,E=function(){D||(D=!0,C());return B.exports},F={},G={exports:F};function H(){__p&&__p();Object.defineProperty(F,"__esModule",{value:!0});F.create=c;F.clone=d;F.length=e;F.fromValues=f;F.copy=g;F.set=h;F.add=i;F.subtract=j;F.multiply=l;F.divide=m;F.ceil=n;F.floor=o;F.min=p;F.max=q;F.round=r;F.scale=s;F.scaleAndAdd=t;F.distance=u;F.squaredDistance=v;F.squaredLength=w;F.negate=x;F.inverse=y;F.normalize=z;F.dot=A;F.cross=B;F.lerp=C;F.hermite=D;F.bezier=E;F.random=G;F.transformMat4=H;F.transformMat3=I;F.transformQuat=J;F.rotateX=K;F.rotateY=L;F.rotateZ=M;F.angle=N;F.zero=O;F.str=P;F.exactEquals=Q;F.equals=R;F.forEach=F.sqrLen=F.len=F.sqrDist=F.dist=F.div=F.mul=F.sub=void 0;var a=b(k());function b(a){__p&&__p();if(a&&a.__esModule)return a;else{var b={};if(a!=null)for(var c in a)if(Object.prototype.hasOwnProperty.call(a,c)){var d=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(a,c):{};d.get||d.set?Object.defineProperty(b,c,d):b[c]=a[c]}b["default"]=a;return b}}function c(){var b=new a.ARRAY_TYPE(3);a.ARRAY_TYPE!=Float32Array&&(b[0]=0,b[1]=0,b[2]=0);return b}function d(b){var c=new a.ARRAY_TYPE(3);c[0]=b[0];c[1]=b[1];c[2]=b[2];return c}function e(a){var b=a[0],c=a[1];a=a[2];return Math.sqrt(b*b+c*c+a*a)}function f(b,c,d){var e=new a.ARRAY_TYPE(3);e[0]=b;e[1]=c;e[2]=d;return e}function g(a,b){a[0]=b[0];a[1]=b[1];a[2]=b[2];return a}function h(a,b,c,d){a[0]=b;a[1]=c;a[2]=d;return a}function i(a,b,c){a[0]=b[0]+c[0];a[1]=b[1]+c[1];a[2]=b[2]+c[2];return a}function j(a,b,c){a[0]=b[0]-c[0];a[1]=b[1]-c[1];a[2]=b[2]-c[2];return a}function l(a,b,c){a[0]=b[0]*c[0];a[1]=b[1]*c[1];a[2]=b[2]*c[2];return a}function m(a,b,c){a[0]=b[0]/c[0];a[1]=b[1]/c[1];a[2]=b[2]/c[2];return a}function n(a,b){a[0]=Math.ceil(b[0]);a[1]=Math.ceil(b[1]);a[2]=Math.ceil(b[2]);return a}function o(a,b){a[0]=Math.floor(b[0]);a[1]=Math.floor(b[1]);a[2]=Math.floor(b[2]);return a}function p(a,b,c){a[0]=Math.min(b[0],c[0]);a[1]=Math.min(b[1],c[1]);a[2]=Math.min(b[2],c[2]);return a}function q(a,b,c){a[0]=Math.max(b[0],c[0]);a[1]=Math.max(b[1],c[1]);a[2]=Math.max(b[2],c[2]);return a}function r(a,b){a[0]=Math.round(b[0]);a[1]=Math.round(b[1]);a[2]=Math.round(b[2]);return a}function s(a,b,c){a[0]=b[0]*c;a[1]=b[1]*c;a[2]=b[2]*c;return a}function t(b,c,d,a){b[0]=c[0]+d[0]*a;b[1]=c[1]+d[1]*a;b[2]=c[2]+d[2]*a;return b}function u(a,b){var c=b[0]-a[0],d=b[1]-a[1];b=b[2]-a[2];return Math.sqrt(c*c+d*d+b*b)}function v(a,b){var c=b[0]-a[0],d=b[1]-a[1];b=b[2]-a[2];return c*c+d*d+b*b}function w(a){var b=a[0],c=a[1];a=a[2];return b*b+c*c+a*a}function x(a,b){a[0]=-b[0];a[1]=-b[1];a[2]=-b[2];return a}function y(a,b){a[0]=1/b[0];a[1]=1/b[1];a[2]=1/b[2];return a}function z(a,b){var c=b[0],d=b[1],e=b[2];c=c*c+d*d+e*e;c>0&&(c=1/Math.sqrt(c));a[0]=b[0]*c;a[1]=b[1]*c;a[2]=b[2]*c;return a}function A(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]}function B(a,b,c){var d=b[0],e=b[1];b=b[2];var f=c[0],g=c[1];c=c[2];a[0]=e*c-b*g;a[1]=b*f-d*c;a[2]=d*g-e*f;return a}function C(a,b,c,d){var e=b[0],f=b[1];b=b[2];a[0]=e+d*(c[0]-e);a[1]=f+d*(c[1]-f);a[2]=b+d*(c[2]-b);return a}function D(a,b,c,d,e,f){var g=f*f,h=g*(2*f-3)+1,i=g*(f-2)+f,j=g*(f-1);g=g*(3-2*f);a[0]=b[0]*h+c[0]*i+d[0]*j+e[0]*g;a[1]=b[1]*h+c[1]*i+d[1]*j+e[1]*g;a[2]=b[2]*h+c[2]*i+d[2]*j+e[2]*g;return a}function E(a,b,c,d,e,f){var g=1-f,h=g*g,i=f*f,j=h*g;h=3*f*h;g=3*i*g;i=i*f;a[0]=b[0]*j+c[0]*h+d[0]*g+e[0]*i;a[1]=b[1]*j+c[1]*h+d[1]*g+e[1]*i;a[2]=b[2]*j+c[2]*h+d[2]*g+e[2]*i;return a}function G(c,b){b=b||1;var d=a.RANDOM()*2*Math.PI,e=a.RANDOM()*2-1,f=Math.sqrt(1-e*e)*b;c[0]=Math.cos(d)*f;c[1]=Math.sin(d)*f;c[2]=e*b;return c}function H(a,b,c){var d=b[0],e=b[1];b=b[2];var f=c[3]*d+c[7]*e+c[11]*b+c[15];f=f||1;a[0]=(c[0]*d+c[4]*e+c[8]*b+c[12])/f;a[1]=(c[1]*d+c[5]*e+c[9]*b+c[13])/f;a[2]=(c[2]*d+c[6]*e+c[10]*b+c[14])/f;return a}function I(a,b,c){var d=b[0],e=b[1];b=b[2];a[0]=d*c[0]+e*c[3]+b*c[6];a[1]=d*c[1]+e*c[4]+b*c[7];a[2]=d*c[2]+e*c[5]+b*c[8];return a}function J(a,b,c){__p&&__p();var d=c[0],e=c[1],f=c[2];c=c[3];var g=b[0],h=b[1];b=b[2];var i=e*b-f*h,j=f*g-d*b,k=d*h-e*g,l=e*k-f*j;f=f*i-d*k;d=d*j-e*i;e=c*2;i*=e;j*=e;k*=e;l*=2;f*=2;d*=2;a[0]=g+i+l;a[1]=h+j+f;a[2]=b+k+d;return a}function K(a,b,c,d){__p&&__p();var e=[],f=[];e[0]=b[0]-c[0];e[1]=b[1]-c[1];e[2]=b[2]-c[2];f[0]=e[0];f[1]=e[1]*Math.cos(d)-e[2]*Math.sin(d);f[2]=e[1]*Math.sin(d)+e[2]*Math.cos(d);a[0]=f[0]+c[0];a[1]=f[1]+c[1];a[2]=f[2]+c[2];return a}function L(a,b,c,d){__p&&__p();var e=[],f=[];e[0]=b[0]-c[0];e[1]=b[1]-c[1];e[2]=b[2]-c[2];f[0]=e[2]*Math.sin(d)+e[0]*Math.cos(d);f[1]=e[1];f[2]=e[2]*Math.cos(d)-e[0]*Math.sin(d);a[0]=f[0]+c[0];a[1]=f[1]+c[1];a[2]=f[2]+c[2];return a}function M(a,b,c,d){__p&&__p();var e=[],f=[];e[0]=b[0]-c[0];e[1]=b[1]-c[1];e[2]=b[2]-c[2];f[0]=e[0]*Math.cos(d)-e[1]*Math.sin(d);f[1]=e[0]*Math.sin(d)+e[1]*Math.cos(d);f[2]=e[2];a[0]=f[0]+c[0];a[1]=f[1]+c[1];a[2]=f[2]+c[2];return a}function N(a,b){__p&&__p();a=f(a[0],a[1],a[2]);b=f(b[0],b[1],b[2]);z(a,a);z(b,b);a=A(a,b);if(a>1)return 0;else if(a<-1)return Math.PI;else return Math.acos(a)}function O(a){a[0]=0;a[1]=0;a[2]=0;return a}function P(a){return"vec3("+a[0]+", "+a[1]+", "+a[2]+")"}function Q(a,b){return a[0]===b[0]&&a[1]===b[1]&&a[2]===b[2]}function R(b,c){var d=b[0],e=b[1];b=b[2];var f=c[0],g=c[1];c=c[2];return Math.abs(d-f)<=a.EPSILON*Math.max(1,Math.abs(d),Math.abs(f))&&Math.abs(e-g)<=a.EPSILON*Math.max(1,Math.abs(e),Math.abs(g))&&Math.abs(b-c)<=a.EPSILON*Math.max(1,Math.abs(b),Math.abs(c))}d=j;F.sub=d;g=l;F.mul=g;h=m;F.div=h;i=u;F.dist=i;n=v;F.sqrDist=n;o=e;F.len=o;p=w;F.sqrLen=p;q=function(){var a=c();return function(b,c,d,e,f,g){c||(c=3);d||(d=0);e?e=Math.min(e*c+d,b.length):e=b.length;for(d=d;d0&&(f=1/Math.sqrt(f));a[0]=c*f;a[1]=d*f;a[2]=e*f;a[3]=b*f;return a}function A(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]}function B(a,b,c,d){__p&&__p();var e=c[0]*d[1]-c[1]*d[0],f=c[0]*d[2]-c[2]*d[0],g=c[0]*d[3]-c[3]*d[0],h=c[1]*d[2]-c[2]*d[1],i=c[1]*d[3]-c[3]*d[1];c=c[2]*d[3]-c[3]*d[2];d=b[0];var j=b[1],k=b[2];b=b[3];a[0]=j*c-k*i+b*h;a[1]=-(d*c)+k*g-b*f;a[2]=d*i-j*g+b*e;a[3]=-(d*h)+j*f-k*e;return a}function C(a,b,c,d){var e=b[0],f=b[1],g=b[2];b=b[3];a[0]=e+d*(c[0]-e);a[1]=f+d*(c[1]-f);a[2]=g+d*(c[2]-g);a[3]=b+d*(c[3]-b);return a}function D(c,b){__p&&__p();b=b||1;var d,e,f,g,h,i;do d=a.RANDOM()*2-1,e=a.RANDOM()*2-1,h=d*d+e*e;while(h>=1);do f=a.RANDOM()*2-1,g=a.RANDOM()*2-1,i=f*f+g*g;while(i>=1);h=Math.sqrt((1-h)/i);c[0]=b*d;c[1]=b*e;c[2]=b*f*h;c[3]=b*g*h;return c}function E(a,b,c){var d=b[0],e=b[1],f=b[2];b=b[3];a[0]=c[0]*d+c[4]*e+c[8]*f+c[12]*b;a[1]=c[1]*d+c[5]*e+c[9]*f+c[13]*b;a[2]=c[2]*d+c[6]*e+c[10]*f+c[14]*b;a[3]=c[3]*d+c[7]*e+c[11]*f+c[15]*b;return a}function F(a,b,c){var d=b[0],e=b[1],f=b[2],g=c[0],h=c[1],i=c[2];c=c[3];var j=c*d+h*f-i*e,k=c*e+i*d-g*f,l=c*f+g*e-h*d;d=-g*d-h*e-i*f;a[0]=j*c+d*-g+k*-i-l*-h;a[1]=k*c+d*-h+l*-g-j*-i;a[2]=l*c+d*-i+j*-h-k*-g;a[3]=b[3];return a}function G(a){a[0]=0;a[1]=0;a[2]=0;a[3]=0;return a}function H(a){return"vec4("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+")"}function I(a,b){return a[0]===b[0]&&a[1]===b[1]&&a[2]===b[2]&&a[3]===b[3]}function J(b,c){var d=b[0],e=b[1],f=b[2];b=b[3];var g=c[0],h=c[1],i=c[2];c=c[3];return Math.abs(d-g)<=a.EPSILON*Math.max(1,Math.abs(d),Math.abs(g))&&Math.abs(e-h)<=a.EPSILON*Math.max(1,Math.abs(e),Math.abs(h))&&Math.abs(f-i)<=a.EPSILON*Math.max(1,Math.abs(f),Math.abs(i))&&Math.abs(b-c)<=a.EPSILON*Math.max(1,Math.abs(b),Math.abs(c))}d=i;K.sub=d;e=j;K.mul=e;f=l;K.div=f;g=t;K.dist=g;h=u;K.sqrDist=h;m=v;K.len=m;n=w;K.sqrLen=n;o=function(){var a=c();return function(b,c,d,e,f,g){c||(c=4);d||(d=0);e?e=Math.min(e*c+d,b.length):e=b.length;for(d=d;da.EPSILON?(b[0]=c[0]/e,b[1]=c[1]/e,b[2]=c[2]/e):(b[0]=1,b[1]=0,b[2]=0);return d}function i(a,b,c){var d=b[0],e=b[1],f=b[2];b=b[3];var g=c[0],h=c[1],i=c[2];c=c[3];a[0]=d*c+b*g+e*i-f*h;a[1]=e*c+b*h+f*g-d*i;a[2]=f*c+b*i+d*h-e*g;a[3]=b*c-d*g-e*h-f*i;return a}function j(a,b,c){__p&&__p();c*=.5;var d=b[0],e=b[1],f=b[2];b=b[3];var g=Math.sin(c);c=Math.cos(c);a[0]=d*c+b*g;a[1]=e*c+f*g;a[2]=f*c-e*g;a[3]=b*c-d*g;return a}function l(a,b,c){__p&&__p();c*=.5;var d=b[0],e=b[1],f=b[2];b=b[3];var g=Math.sin(c);c=Math.cos(c);a[0]=d*c-f*g;a[1]=e*c+b*g;a[2]=f*c+d*g;a[3]=b*c-e*g;return a}function m(a,b,c){__p&&__p();c*=.5;var d=b[0],e=b[1],f=b[2];b=b[3];var g=Math.sin(c);c=Math.cos(c);a[0]=d*c+e*g;a[1]=e*c-d*g;a[2]=f*c+b*g;a[3]=b*c-f*g;return a}function n(a,b){var c=b[0],d=b[1];b=b[2];a[0]=c;a[1]=d;a[2]=b;a[3]=Math.sqrt(Math.abs(1-c*c-d*d-b*b));return a}function o(b,c,d,e){__p&&__p();var f=c[0],g=c[1],h=c[2];c=c[3];var i=d[0],j=d[1],k=d[2];d=d[3];var l,m,n;l=f*i+g*j+h*k+c*d;l<0&&(l=-l,i=-i,j=-j,k=-k,d=-d);1-l>a.EPSILON?(l=Math.acos(l),m=Math.sin(l),n=Math.sin((1-e)*l)/m,l=Math.sin(e*l)/m):(n=1-e,l=e);b[0]=n*f+l*i;b[1]=n*g+l*j;b[2]=n*h+l*k;b[3]=n*c+l*d;return b}function p(b){var c=a.RANDOM(),d=a.RANDOM(),e=a.RANDOM(),f=Math.sqrt(1-c);c=Math.sqrt(c);b[0]=f*Math.sin(2*Math.PI*d);b[1]=f*Math.cos(2*Math.PI*d);b[2]=c*Math.sin(2*Math.PI*e);b[3]=c*Math.cos(2*Math.PI*e);return b}function q(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c*c+d*d+e*e+b*b;f=f?1/f:0;a[0]=-c*f;a[1]=-d*f;a[2]=-e*f;a[3]=b*f;return a}function r(a,b){a[0]=-b[0];a[1]=-b[1];a[2]=-b[2];a[3]=b[3];return a}function s(a,b){__p&&__p();var c=b[0]+b[4]+b[8];if(c>0)c=Math.sqrt(c+1),a[3]=.5*c,c=.5/c,a[0]=(b[5]-b[7])*c,a[1]=(b[6]-b[2])*c,a[2]=(b[1]-b[3])*c;else{var d=0;b[4]>b[0]&&(d=1);b[8]>b[d*3+d]&&(d=2);var e=(d+1)%3,f=(d+2)%3;c=Math.sqrt(b[d*3+d]-b[e*3+e]-b[f*3+f]+1);a[d]=.5*c;c=.5/c;a[3]=(b[e*3+f]-b[f*3+e])*c;a[e]=(b[e*3+d]+b[d*3+e])*c;a[f]=(b[f*3+d]+b[d*3+f])*c}return a}function t(a,b,c,d){__p&&__p();var e=.5*Math.PI/180;b*=e;c*=e;d*=e;e=Math.sin(b);b=Math.cos(b);var f=Math.sin(c);c=Math.cos(c);var g=Math.sin(d);d=Math.cos(d);a[0]=e*c*d-b*f*g;a[1]=b*f*d+e*c*g;a[2]=b*c*g-e*f*d;a[3]=b*c*d+e*f*g;return a}function u(a){return"quat("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+")"}h=f.clone;P.clone=h;j=f.fromValues;P.fromValues=j;l=f.copy;P.copy=l;m=f.set;P.set=m;n=f.add;P.add=n;p=i;P.mul=p;q=f.scale;P.scale=q;r=f.dot;P.dot=r;t=f.lerp;P.lerp=t;u=f.length;P.length=u;d=u;P.len=d;h=f.squaredLength;P.squaredLength=h;j=h;P.sqrLen=j;var v=f.normalize;P.normalize=v;l=f.exactEquals;P.exactEquals=l;m=f.equals;P.equals=m;n=function(){__p&&__p();var a=c.create(),b=c.fromValues(1,0,0),d=c.fromValues(0,1,0);return function(e,f,h){__p&&__p();var i=c.dot(f,h);if(i<-.999999){c.cross(a,b,f);c.len(a)<1e-6&&c.cross(a,d,f);c.normalize(a,a);g(e,a,Math.PI);return e}else if(i>.999999){e[0]=0;e[1]=0;e[2]=0;e[3]=1;return e}else{c.cross(a,f,h);e[0]=a[0];e[1]=a[1];e[2]=a[2];e[3]=1+i;return v(e,e)}}}();P.rotationTo=n;i=function(){var a=e(),b=e();return function(c,d,e,f,g,h){o(a,d,g,h);o(b,e,f,h);o(c,a,b,2*h*(1-h));return c}}();P.sqlerp=i;p=function(){__p&&__p();var a=b.create();return function(b,c,d,e){__p&&__p();a[0]=d[0];a[3]=d[1];a[6]=d[2];a[1]=e[0];a[4]=e[1];a[7]=e[2];a[2]=-c[0];a[5]=-c[1];a[8]=-c[2];return v(b,s(b,a))}}();P.setAxes=p}var S=!1,T=function(){S||(S=!0,R());return Q.exports},U={},V={exports:U};function W(){__p&&__p();Object.defineProperty(U,"__esModule",{value:!0});U.create=e;U.clone=f;U.fromValues=g;U.fromRotationTranslationValues=h;U.fromRotationTranslation=i;U.fromTranslation=j;U.fromRotation=l;U.fromMat4=m;U.copy=n;U.identity=o;U.set=p;U.getDual=q;U.setDual=r;U.getTranslation=s;U.translate=t;U.rotateX=u;U.rotateY=v;U.rotateZ=w;U.rotateByQuatAppend=x;U.rotateByQuatPrepend=y;U.rotateAroundAxis=z;U.add=A;U.multiply=B;U.scale=C;U.lerp=F;U.invert=G;U.conjugate=H;U.normalize=J;U.str=K;U.exactEquals=L;U.equals=M;U.sqrLen=U.squaredLength=U.len=U.length=U.dot=U.mul=U.setReal=U.getReal=void 0;var a=d(k()),b=d(T()),c=d(E());function d(a){__p&&__p();if(a&&a.__esModule)return a;else{var b={};if(a!=null)for(var c in a)if(Object.prototype.hasOwnProperty.call(a,c)){var d=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(a,c):{};d.get||d.set?Object.defineProperty(b,c,d):b[c]=a[c]}b["default"]=a;return b}}function e(){var b=new a.ARRAY_TYPE(8);a.ARRAY_TYPE!=Float32Array&&(b[0]=0,b[1]=0,b[2]=0,b[4]=0,b[5]=0,b[6]=0,b[7]=0);b[3]=1;return b}function f(b){__p&&__p();var c=new a.ARRAY_TYPE(8);c[0]=b[0];c[1]=b[1];c[2]=b[2];c[3]=b[3];c[4]=b[4];c[5]=b[5];c[6]=b[6];c[7]=b[7];return c}function g(b,c,d,e,f,g,h,i){__p&&__p();var j=new a.ARRAY_TYPE(8);j[0]=b;j[1]=c;j[2]=d;j[3]=e;j[4]=f;j[5]=g;j[6]=h;j[7]=i;return j}function h(b,c,d,e,f,g,h){__p&&__p();var i=new a.ARRAY_TYPE(8);i[0]=b;i[1]=c;i[2]=d;i[3]=e;f=f*.5;g=g*.5;h=h*.5;i[4]=f*e+g*d-h*c;i[5]=g*e+h*b-f*d;i[6]=h*e+f*c-g*b;i[7]=-f*b-g*c-h*d;return i}function i(a,b,c){__p&&__p();var d=c[0]*.5,e=c[1]*.5;c=c[2]*.5;var f=b[0],g=b[1],h=b[2];b=b[3];a[0]=f;a[1]=g;a[2]=h;a[3]=b;a[4]=d*b+e*h-c*g;a[5]=e*b+c*f-d*h;a[6]=c*b+d*g-e*f;a[7]=-d*f-e*g-c*h;return a}function j(a,b){a[0]=0;a[1]=0;a[2]=0;a[3]=1;a[4]=b[0]*.5;a[5]=b[1]*.5;a[6]=b[2]*.5;a[7]=0;return a}function l(a,b){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];a[4]=0;a[5]=0;a[6]=0;a[7]=0;return a}function m(d,e){var f=b.create();c.getRotation(f,e);var g=new a.ARRAY_TYPE(3);c.getTranslation(g,e);i(d,f,g);return d}function n(a,b){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];a[4]=b[4];a[5]=b[5];a[6]=b[6];a[7]=b[7];return a}function o(a){a[0]=0;a[1]=0;a[2]=0;a[3]=1;a[4]=0;a[5]=0;a[6]=0;a[7]=0;return a}function p(a,b,c,d,e,f,g,h,i){a[0]=b;a[1]=c;a[2]=d;a[3]=e;a[4]=f;a[5]=g;a[6]=h;a[7]=i;return a}e=b.copy;U.getReal=e;function q(a,b){a[0]=b[4];a[1]=b[5];a[2]=b[6];a[3]=b[7];return a}f=b.copy;U.setReal=f;function r(a,b){a[4]=b[0];a[5]=b[1];a[6]=b[2];a[7]=b[3];return a}function s(a,b){var c=b[4],d=b[5],e=b[6],f=b[7],g=-b[0],h=-b[1],i=-b[2];b=b[3];a[0]=(c*b+f*g+d*i-e*h)*2;a[1]=(d*b+f*h+e*g-c*i)*2;a[2]=(e*b+f*i+c*h-d*g)*2;return a}function t(a,b,c){__p&&__p();var d=b[0],e=b[1],f=b[2],g=b[3],h=c[0]*.5,i=c[1]*.5;c=c[2]*.5;var j=b[4],k=b[5],l=b[6];b=b[7];a[0]=d;a[1]=e;a[2]=f;a[3]=g;a[4]=g*h+e*c-f*i+j;a[5]=g*i+f*h-d*c+k;a[6]=g*c+d*i-e*h+l;a[7]=-d*h-e*i-f*c+b;return a}function u(a,c,d){__p&&__p();var e=-c[0],f=-c[1],g=-c[2],h=c[3],i=c[4],j=c[5],k=c[6],l=c[7],m=i*h+l*e+j*g-k*f,n=j*h+l*f+k*e-i*g,o=k*h+l*g+i*f-j*e;l=l*h-i*e-j*f-k*g;b.rotateX(a,c,d);e=a[0];f=a[1];g=a[2];h=a[3];a[4]=m*h+l*e+n*g-o*f;a[5]=n*h+l*f+o*e-m*g;a[6]=o*h+l*g+m*f-n*e;a[7]=l*h-m*e-n*f-o*g;return a}function v(a,c,d){__p&&__p();var e=-c[0],f=-c[1],g=-c[2],h=c[3],i=c[4],j=c[5],k=c[6],l=c[7],m=i*h+l*e+j*g-k*f,n=j*h+l*f+k*e-i*g,o=k*h+l*g+i*f-j*e;l=l*h-i*e-j*f-k*g;b.rotateY(a,c,d);e=a[0];f=a[1];g=a[2];h=a[3];a[4]=m*h+l*e+n*g-o*f;a[5]=n*h+l*f+o*e-m*g;a[6]=o*h+l*g+m*f-n*e;a[7]=l*h-m*e-n*f-o*g;return a}function w(a,c,d){__p&&__p();var e=-c[0],f=-c[1],g=-c[2],h=c[3],i=c[4],j=c[5],k=c[6],l=c[7],m=i*h+l*e+j*g-k*f,n=j*h+l*f+k*e-i*g,o=k*h+l*g+i*f-j*e;l=l*h-i*e-j*f-k*g;b.rotateZ(a,c,d);e=a[0];f=a[1];g=a[2];h=a[3];a[4]=m*h+l*e+n*g-o*f;a[5]=n*h+l*f+o*e-m*g;a[6]=o*h+l*g+m*f-n*e;a[7]=l*h-m*e-n*f-o*g;return a}function x(a,b,c){__p&&__p();var d=c[0],e=c[1],f=c[2];c=c[3];var g=b[0],h=b[1],i=b[2],j=b[3];a[0]=g*c+j*d+h*f-i*e;a[1]=h*c+j*e+i*d-g*f;a[2]=i*c+j*f+g*e-h*d;a[3]=j*c-g*d-h*e-i*f;g=b[4];h=b[5];i=b[6];j=b[7];a[4]=g*c+j*d+h*f-i*e;a[5]=h*c+j*e+i*d-g*f;a[6]=i*c+j*f+g*e-h*d;a[7]=j*c-g*d-h*e-i*f;return a}function y(a,b,c){__p&&__p();var d=b[0],e=b[1],f=b[2];b=b[3];var g=c[0],h=c[1],i=c[2],j=c[3];a[0]=d*j+b*g+e*i-f*h;a[1]=e*j+b*h+f*g-d*i;a[2]=f*j+b*i+d*h-e*g;a[3]=b*j-d*g-e*h-f*i;g=c[4];h=c[5];i=c[6];j=c[7];a[4]=d*j+b*g+e*i-f*h;a[5]=e*j+b*h+f*g-d*i;a[6]=f*j+b*i+d*h-e*g;a[7]=b*j-d*g-e*h-f*i;return a}function z(b,c,d,e){__p&&__p();if(Math.abs(e)0){c=Math.sqrt(c);var d=b[0]/c,e=b[1]/c,f=b[2]/c,g=b[3]/c,h=b[4],i=b[5],j=b[6];b=b[7];var k=d*h+e*i+f*j+g*b;a[0]=d;a[1]=e;a[2]=f;a[3]=g;a[4]=(h-d*k)/c;a[5]=(i-e*k)/c;a[6]=(j-f*k)/c;a[7]=(b-g*k)/c}return a}function K(a){return"quat2("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+")"}function L(a,b){return a[0]===b[0]&&a[1]===b[1]&&a[2]===b[2]&&a[3]===b[3]&&a[4]===b[4]&&a[5]===b[5]&&a[6]===b[6]&&a[7]===b[7]}function M(b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],i=b[5],j=b[6];b=b[7];var k=c[0],l=c[1],m=c[2],n=c[3],o=c[4],p=c[5],q=c[6];c=c[7];return Math.abs(d-k)<=a.EPSILON*Math.max(1,Math.abs(d),Math.abs(k))&&Math.abs(e-l)<=a.EPSILON*Math.max(1,Math.abs(e),Math.abs(l))&&Math.abs(f-m)<=a.EPSILON*Math.max(1,Math.abs(f),Math.abs(m))&&Math.abs(g-n)<=a.EPSILON*Math.max(1,Math.abs(g),Math.abs(n))&&Math.abs(h-o)<=a.EPSILON*Math.max(1,Math.abs(h),Math.abs(o))&&Math.abs(i-p)<=a.EPSILON*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(j-q)<=a.EPSILON*Math.max(1,Math.abs(j),Math.abs(q))&&Math.abs(b-c)<=a.EPSILON*Math.max(1,Math.abs(b),Math.abs(c))}}var X=!1,aa=function(){X||(X=!0,W());return V.exports},Y={},ba={exports:Y};function ca(){__p&&__p();Object.defineProperty(Y,"__esModule",{value:!0});Y.create=c;Y.clone=d;Y.fromValues=e;Y.copy=f;Y.set=g;Y.add=h;Y.subtract=i;Y.multiply=j;Y.divide=l;Y.ceil=m;Y.floor=n;Y.min=o;Y.max=p;Y.round=q;Y.scale=r;Y.scaleAndAdd=s;Y.distance=t;Y.squaredDistance=u;Y.length=v;Y.squaredLength=w;Y.negate=x;Y.inverse=y;Y.normalize=z;Y.dot=A;Y.cross=B;Y.lerp=C;Y.random=D;Y.transformMat2=E;Y.transformMat2d=F;Y.transformMat3=G;Y.transformMat4=H;Y.rotate=I;Y.angle=J;Y.zero=K;Y.str=L;Y.exactEquals=M;Y.equals=N;Y.forEach=Y.sqrLen=Y.sqrDist=Y.dist=Y.div=Y.mul=Y.sub=Y.len=void 0;var a=b(k());function b(a){__p&&__p();if(a&&a.__esModule)return a;else{var b={};if(a!=null)for(var c in a)if(Object.prototype.hasOwnProperty.call(a,c)){var d=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(a,c):{};d.get||d.set?Object.defineProperty(b,c,d):b[c]=a[c]}b["default"]=a;return b}}function c(){var b=new a.ARRAY_TYPE(2);a.ARRAY_TYPE!=Float32Array&&(b[0]=0,b[1]=0);return b}function d(b){var c=new a.ARRAY_TYPE(2);c[0]=b[0];c[1]=b[1];return c}function e(b,c){var d=new a.ARRAY_TYPE(2);d[0]=b;d[1]=c;return d}function f(a,b){a[0]=b[0];a[1]=b[1];return a}function g(a,b,c){a[0]=b;a[1]=c;return a}function h(a,b,c){a[0]=b[0]+c[0];a[1]=b[1]+c[1];return a}function i(a,b,c){a[0]=b[0]-c[0];a[1]=b[1]-c[1];return a}function j(a,b,c){a[0]=b[0]*c[0];a[1]=b[1]*c[1];return a}function l(a,b,c){a[0]=b[0]/c[0];a[1]=b[1]/c[1];return a}function m(a,b){a[0]=Math.ceil(b[0]);a[1]=Math.ceil(b[1]);return a}function n(a,b){a[0]=Math.floor(b[0]);a[1]=Math.floor(b[1]);return a}function o(a,b,c){a[0]=Math.min(b[0],c[0]);a[1]=Math.min(b[1],c[1]);return a}function p(a,b,c){a[0]=Math.max(b[0],c[0]);a[1]=Math.max(b[1],c[1]);return a}function q(a,b){a[0]=Math.round(b[0]);a[1]=Math.round(b[1]);return a}function r(a,b,c){a[0]=b[0]*c;a[1]=b[1]*c;return a}function s(b,c,d,a){b[0]=c[0]+d[0]*a;b[1]=c[1]+d[1]*a;return b}function t(a,b){var c=b[0]-a[0];b=b[1]-a[1];return Math.sqrt(c*c+b*b)}function u(a,b){var c=b[0]-a[0];b=b[1]-a[1];return c*c+b*b}function v(a){var b=a[0];a=a[1];return Math.sqrt(b*b+a*a)}function w(a){var b=a[0];a=a[1];return b*b+a*a}function x(a,b){a[0]=-b[0];a[1]=-b[1];return a}function y(a,b){a[0]=1/b[0];a[1]=1/b[1];return a}function z(a,b){var c=b[0],d=b[1];c=c*c+d*d;c>0&&(c=1/Math.sqrt(c));a[0]=b[0]*c;a[1]=b[1]*c;return a}function A(a,b){return a[0]*b[0]+a[1]*b[1]}function B(a,b,c){b=b[0]*c[1]-b[1]*c[0];a[0]=a[1]=0;a[2]=b;return a}function C(a,b,c,d){var e=b[0];b=b[1];a[0]=e+d*(c[0]-e);a[1]=b+d*(c[1]-b);return a}function D(c,b){b=b||1;var d=a.RANDOM()*2*Math.PI;c[0]=Math.cos(d)*b;c[1]=Math.sin(d)*b;return c}function E(a,b,c){var d=b[0];b=b[1];a[0]=c[0]*d+c[2]*b;a[1]=c[1]*d+c[3]*b;return a}function F(a,b,c){var d=b[0];b=b[1];a[0]=c[0]*d+c[2]*b+c[4];a[1]=c[1]*d+c[3]*b+c[5];return a}function G(a,b,c){var d=b[0];b=b[1];a[0]=c[0]*d+c[3]*b+c[6];a[1]=c[1]*d+c[4]*b+c[7];return a}function H(a,b,c){var d=b[0];b=b[1];a[0]=c[0]*d+c[4]*b+c[12];a[1]=c[1]*d+c[5]*b+c[13];return a}function I(a,b,c,d){var e=b[0]-c[0];b=b[1]-c[1];var f=Math.sin(d);d=Math.cos(d);a[0]=e*d-b*f+c[0];a[1]=e*f+b*d+c[1];return a}function J(a,b){__p&&__p();var c=a[0];a=a[1];var d=b[0];b=b[1];var e=c*c+a*a;e>0&&(e=1/Math.sqrt(e));var f=d*d+b*b;f>0&&(f=1/Math.sqrt(f));c=(c*d+a*b)*e*f;if(c>1)return 0;else if(c<-1)return Math.PI;else return Math.acos(c)}function K(a){a[0]=0;a[1]=0;return a}function L(a){return"vec2("+a[0]+", "+a[1]+")"}function M(a,b){return a[0]===b[0]&&a[1]===b[1]}function N(b,c){var d=b[0];b=b[1];var e=c[0];c=c[1];return Math.abs(d-e)<=a.EPSILON*Math.max(1,Math.abs(d),Math.abs(e))&&Math.abs(b-c)<=a.EPSILON*Math.max(1,Math.abs(b),Math.abs(c))}d=v;Y.len=d;e=i;Y.sub=e;f=j;Y.mul=f;g=l;Y.div=g;h=t;Y.dist=h;m=u;Y.sqrDist=m;n=w;Y.sqrLen=n;o=function(){var a=c();return function(b,c,d,e,f,g){c||(c=2);d||(d=0);e?e=Math.min(e*c+d,b.length):e=b.length;for(d=d;df?0:b("radToDeg")(Math.atan2(g*e-c*d,g*d+c*e))};var j=b("degToRad")(d.partialLeftDegrees||180),k=b("degToRad")(d.partialRightDegrees||180),l=b("degToRad")(d.partialTopDegrees||90);d=b("degToRad")(d.partialBottomDegrees||90);return this.normalizeLimits({partialLeftDegrees:e(j,h,c),partialRightDegrees:e(k,h,c),partialTopDegrees:e(l,i,g),partialBottomDegrees:e(d,i,g)})},projectVertex:function(a,b,c,d){__p&&__p();var e=a[0];a=a[1];var f=c?Math.sin(e):Math.sin(e)*Math.cos(a),g=c?a:Math.sin(a);c=c?Math.cos(e):Math.cos(e)*Math.cos(a);f=d*f+(1-d)*e;g=d*g+(1-d)*a;c=d*c+(1-d)*1;e=h.fromValues(f,g,c);h.transformMat4(e,e,b);return e},getSphericalFromVertex:function(a){var b=a[0],c=a[1];a=a[2];var d=Math.atan2(b,a);c=Math.atan2(c,Math.sqrt(b*b+a*a));return{yaw:d,pitch:c}},getRelativeHfov:function(a,c,d){a=this.getPartialLimits(a,c,d);c=d.partialLeftDegrees||180;d=d.partialRightDegrees||180;var e=a.partialLeftDegrees||0;a=a.partialRightDegrees||0;return b("degToRad")(d-a+c-e)},getRelativeVfov:function(a,c,d){a=this.getPartialLimits(a,c,d);c=d.partialTopDegrees||90;d=d.partialBottomDegrees||90;var e=a.partialTopDegrees||0;a=a.partialBottomDegrees||0;return b("degToRad")(c-e+d-a)},convert2dTo3d:function(a,c,d,e,f,i){__p&&__p();var j=e/f,k=e/2,l=f/2;a=(a-k)*(2/e);k=(c-l)*(2/f);e=b("degToRad")(d.fov);c=this.getHfov(e,j);l=this.getMinFullHfov(b("degToRad")(i.partialLeftDegrees||180),b("degToRad")(i.partialRightDegrees||180));f=Math.tan(e/2);e=Math.tan(c/2);c=Math.tan(Math.min(c,l)/2);l=a*e;a=-k*f;if(l>c||l<-c)return null;e=this.getZoomProgress(d.fov,i,j);k=g.create();g.rotateY(k,k,b("degToRad")(d.yaw));g.rotateX(k,k,-b("degToRad")(d.pitch));f=this.projectVertex(h.fromValues(l,a,-1),k,!1,e);c=this.getSphericalFromVertex(f);i=b("radToDeg")(c.yaw);return{yaw:i<0?360+i:i,pitch:b("radToDeg")(c.pitch)}},convert3dTo2d:function(a,c,d,e,f,i){__p&&__p();a=b("degToRad")(a);c=b("degToRad")(c);var j=b("degToRad")(d.fov),k=e/f,l=this.getHfov(j,k),m=this.getMinFullHfov(b("degToRad")(i.partialLeftDegrees||180),b("degToRad")(i.partialRightDegrees||180)),n=Math.tan(l/2);l=Math.tan(Math.min(l,m)/2);m=l/n;l=this.getMinFullVfov(b("degToRad")(i.partialTopDegrees||90),b("degToRad")(i.partialBottomDegrees||90));n=Math.tan(j/2);j=Math.tan(Math.min(j,l)/2);l=j/n;j=this.getRelativeHfov(d.fov,k,i);n=this.getRelativeVfov(d.fov,k,i);k=g.create();g.rotateY(k,k,b("degToRad")(d.yaw));g.rotateX(k,k,-b("degToRad")(d.pitch));g.invert(k,k);i=a+Math.PI;d=c+Math.PI/2;a=-Math.sin(d)*Math.sin(i);c=-Math.cos(d);d=-Math.sin(d)*Math.cos(i);i=h.fromValues(a,c,d);h.transformMat4(i,i,k);a=Math.atan2(i[0],i[2]);c=Math.atan2(i[1],Math.sqrt(i[0]*i[0]+i[2]*i[2]));d=.5+a*m/j;k=.5-c*l/n;return{x:d*e,y:k*f}}};e.exports=a}),null); __d("calculateHFOVFromVFOV",["degToRad","radToDeg"],(function(a,b,c,d,e,f){"use strict";a=function(a,c){a=b("radToDeg")(Math.atan(Math.tan(b("degToRad")(a/2))*c)*2);return(a%360+360)%360};e.exports=a}),null); __d("calculateVFOVFromHFOV",["degToRad","radToDeg"],(function(a,b,c,d,e,f){"use strict";a=function(a,c){a=b("radToDeg")(Math.atan(Math.tan(b("degToRad")(a)/2)/c))*2;return(a%360+360)%360};e.exports=a}),null); __d("SphericalViewportControl",["csx","cx","invariant","Bootloader","CSS","DOMEventListener","DOMQuery","Event","EventEmitter","Keys","Parent","SphericalPhotoProjectionUtils","SubscriptionsHandler","UserAgent","VelocityTracker","calculateHFOVFromVFOV","calculateVFOVFromHFOV","debounce","degToRad","getElementRect","performanceNow","queryThenMutateDOM","radToDeg","requestAnimationFrame","throttle","uniqueID"],(function(a,b,c,d,e,f,g,h,i){__p&&__p();var j=b("DOMQuery").scry(window.document.body,"_li")[0]||window.document.body,k=navigator===void 0||navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i),l=.6,m=2.5,n=20,o=110,p=179,q=.01,r=1e3,s=.5,t=["W","A","S","D"].reduce(function(a,b){a[b]=b.charCodeAt(0);return a},{}),u={Up:"__tu",Down:"__tz",Left:"_2a6u",Right:"_2a6v",UpLeft:"__t-",UpRight:"__u0",DownLeft:"__u1",DownRight:"__u3"};a=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c,d,e,f,g){__p&&__p();var h;e===void 0&&(e={});f===void 0&&(f=!1);g===void 0&&(g=j);h=a.call(this)||this;h.$SphericalViewportControl18=!1;h.$SphericalViewportControl19=!1;h.$SphericalViewportControl20=!1;h.$SphericalViewportControl45=!1;h.$SphericalViewportControl62=!1;h.$SphericalViewportControl64={x:1,y:1};h.$SphericalViewportControl65=!1;h.$SphericalViewportControl66=null;h.$SphericalViewportControl69=!1;h.$SphericalViewportControl70=!0;h.$SphericalViewportControl90=function(a){__p&&__p();a.deliberateSync=!0;if(h.$SphericalViewportControl67){if(a.shiftKey){var c=h.$SphericalViewportControl114(a),d=b("getElementRect")(h.$SphericalViewportControl32);if(c.x>d.left&&c.xd.top&&c.y0||h.$SphericalViewportControl9.getSpeed()>0;if(h.$SphericalViewportControl19||h.$SphericalViewportControl18||h.$SphericalViewportControl20||h.$SphericalViewportControl57||h.$SphericalViewportControl45||e||d)h.$SphericalViewportControl66=b("requestAnimationFrame")(h.$SphericalViewportControl128);else{h.$SphericalViewportControl15=!1;h.$SphericalViewportControl66=null;f={yaw:h.$SphericalViewportControl26.x,pitch:h.$SphericalViewportControl26.y};c=h.getCurrentViewport();h.$SphericalViewportControl4.pitch+=f.pitch-c.pitch;h.$SphericalViewportControl4.yaw-=f.yaw-c.yaw;h.emit("updateViewportEnd",h.$SphericalViewportControl26.x,h.$SphericalViewportControl26.y)}};h.$SphericalViewportControl124=b("throttle")(function(a){h.emit("wheelScroll",a);if(!h.$SphericalViewportControl46)return;a=(a.deltaX||0)+(a.deltaY||0)+(a.deltaZ||0);a=a/120*45/10;h.$SphericalViewportControl99(a)},30);h.$SphericalViewportControl70=e.listenOnlyOneElement==null?!0:e.listenOnlyOneElement;h.$SphericalViewportControl4={pitch:0,yaw:0};h.$SphericalViewportControl5=d.dragVelocityFactor||l;h.$SphericalViewportControl3=!1;h.$SphericalViewportControl8=new(b("VelocityTracker"))(300);h.$SphericalViewportControl9=new(b("VelocityTracker"))(300);h.$SphericalViewportControl13=new(b("SubscriptionsHandler"))();h.$SphericalViewportControl32=c;h.$SphericalViewportControl10=g;h.$SphericalViewportControl51=n;h.$SphericalViewportControl52=o;h.$SphericalViewportControl53=p;h.$SphericalViewportControl63=f;h.$SphericalViewportControl71(d);h.$SphericalViewportControl21={x:0,y:0};h.$SphericalViewportControl59=0;h.$SphericalViewportControl17={left:0,right:0,up:0,down:0};h.$SphericalViewportControl23={x:0,y:0};h.$SphericalViewportControl24={x:0,y:0};h.$SphericalViewportControl25=new(b("VelocityTracker"))();h.$SphericalViewportControl30=new Map();h.$SphericalViewportControl38=!1;h.$SphericalViewportControl22=!1;h.$SphericalViewportControl27=!1;h.$SphericalViewportControl72(e);h.$SphericalViewportControl57=!1;h.$SphericalViewportControl58=0;h.$SphericalViewportControl56=b("debounce")(function(){return h.emit("zoomStart")},r);h.$SphericalViewportControl37=h.$SphericalViewportControl73();h.$SphericalViewportControl61=[];h.$SphericalViewportControl31=h.addNewLayer(h.$SphericalViewportControl32);k&&b("Bootloader").loadModules(["FullTilt"],function(a){a.getDeviceOrientation({type:"game"}).then(function(a){return h.$SphericalViewportControl74(a,d)})["catch"](function(a){return h.$SphericalViewportControl75(a)})},"SphericalViewportControl");return h}var d=c.prototype;d.$SphericalViewportControl74=function(a,c){var d=this;if(c.partialLimits){var e=c.partialLimits,f=this.getVerticalFieldOfView(),g=this.getHorizontalFieldOfView();this.$SphericalViewportControl6={top:(e.partialTopDegrees||Infinity)-f/2,bottom:-(e.partialBottomDegrees||Infinity)+f/2,left:-(e.partialLeftDegrees||Infinity)+g/2,right:(e.partialRightDegrees||Infinity)-g/2}}b("Bootloader").loadModules(["MSphericalViewportControlEuler"],function(b){d.$SphericalViewportControl2=new b(a,c,d.$SphericalViewportControl6),d.$SphericalViewportControl2.setActive(!0),d.$SphericalViewportControl1=a,d.$SphericalViewportControl1.start(function(){return d.$SphericalViewportControl76()}),d.$SphericalViewportControl3=!0},"SphericalViewportControl")};d.$SphericalViewportControl76=function(){var a={yaw:b("degToRad")(this.$SphericalViewportControl4.yaw-this.$SphericalViewportControl28.x),pitch:b("degToRad")(this.$SphericalViewportControl4.pitch+this.$SphericalViewportControl28.y)};this.$SphericalViewportControl2.onSensorUpdate();this.$SphericalViewportControl2.getRotationMatrix(a);a=this.getCurrentViewport();this.$SphericalViewportControl15||this.emit("viewportChange",a.yaw,a.pitch,this.$SphericalViewportControl11)};d.getCurrentViewport=function(){var a={yaw:b("degToRad")(this.$SphericalViewportControl4.yaw-this.$SphericalViewportControl28.x),pitch:b("degToRad")(this.$SphericalViewportControl4.pitch+this.$SphericalViewportControl28.y)};return!this.$SphericalViewportControl3?{pitch:b("radToDeg")(a.pitch),yaw:b("radToDeg")(a.yaw)}:this.$SphericalViewportControl2.getCurrentViewport(a)||{pitch:b("radToDeg")(a.pitch),yaw:b("radToDeg")(a.yaw)}};d.$SphericalViewportControl75=function(a){this.emit("sensorSetupError",{error:"SPHERICAL_GYROSCOPE_SETUP_FAILED",message:a})};d.isListening=function(a){return!this.$SphericalViewportControl70||Boolean(this.getSubscriptionKeyFromElement(a))};d.getSubscriptionKeyFromElement=function(a){__p&&__p();for(var b=this.$SphericalViewportControl30,c=Array.isArray(b),d=0,b=c?b:b[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var e;if(c){if(d>=b.length)break;e=b[d++]}else{d=b.next();if(d.done)break;e=d.value}e=e;var f=e[0];e=e[1];if(e.element===a)return f}return null};d.addNewLayer=function(a){var c=this.getSubscriptionKeyFromElement(a);if(!c){c=b("uniqueID")();var d=new(b("SubscriptionsHandler"))();this.$SphericalViewportControl77(d,a);this.$SphericalViewportControl30.set(c,{handler:d,element:a})}return c};d.removeLayer=function(a){var b=this.$SphericalViewportControl30.get(a);b&&(b.handler.release(),this.$SphericalViewportControl30["delete"](a))};d.destroy=function(){this.removeAllListeners(),this.getSubscriptions().remove()};d.$SphericalViewportControl77=function(a,c){__p&&__p();var d=this;a.addSubscriptions(b("Event").listen(c,"mousedown",function(a){return d.$SphericalViewportControl78(a)}),b("Event").listen(c,"mouseenter",function(a){return d.$SphericalViewportControl79(a,c)}),b("Event").listen(c,"mouseleave",function(a){return d.$SphericalViewportControl80(a,c)}),b("Event").listen(c,"mousemove",function(a){return d.$SphericalViewportControl81(a)}),b("Event").listen(c,"mouseup",function(a){return d.$SphericalViewportControl82(a)}),b("Event").listen(c,"click",function(a){return d.$SphericalViewportControl83(a)}),b("Event").listen(c,"keydown",function(a){return d.$SphericalViewportControl84(a)}),b("Event").listen(c,"keyup",function(a){return d.$SphericalViewportControl85(a)}),b("Event").listen(c,"blur",function(a){return d.$SphericalViewportControl86(a)}),b("Event").listen(c,"touchstart",function(a){return d.$SphericalViewportControl87(a)}),b("Event").listen(c,"touchmove",function(a){return d.$SphericalViewportControl88(a)}),b("Event").listen(c,"touchend",function(a){return d.$SphericalViewportControl89(a)}),b("Event").listen(c,"touchcancel",function(a){return d.$SphericalViewportControl89(a)}),{remove:function(){b("DOMEventListener").remove(c,"wheel",function(a){return d.$SphericalViewportControl90(a)},{passive:!1})}})};d.$SphericalViewportControl71=function(a){__p&&__p();this.$SphericalViewportControl91();this.$SphericalViewportControl7=this.$SphericalViewportControl34/this.$SphericalViewportControl35;var b=a.fieldOfView;this.$SphericalViewportControl46=Boolean(a.enableZoom);this.$SphericalViewportControl29=(a.panningVelocityFactor||0)/15*80||80;this.$SphericalViewportControl16=(a.keyboardVelocityFactor||0)*1e3||80;a.partialLimits?(this.$SphericalViewportControl39=a.partialLimits,this.$SphericalViewportControl42=!0):(this.$SphericalViewportControl42=!1,this.$SphericalViewportControl39={partialLeftDegrees:null,partialRightDegrees:null,partialTopDegrees:null,partialBottomDegrees:null});this.$SphericalViewportControl40=this.$SphericalViewportControl39;this.$SphericalViewportControl41=1;this.$SphericalViewportControl63&&(this.$SphericalViewportControl42=!0);this.$SphericalViewportControl28={x:a.initialHeading,y:a.initialPitch};a=this.$SphericalViewportControl39;var c=a.partialTopDegrees;a=a.partialBottomDegrees;if(!this.$SphericalViewportControl63&&(c||c===0)&&(a||a===0)){c=c;a=a;var d=c+a;b>d&&(b=d,this.$SphericalViewportControl28.y=(c-a)/2)}this.$SphericalViewportControl11=this.$SphericalViewportControl92(b);this.$SphericalViewportControl12=this.$SphericalViewportControl11;this.$SphericalViewportControl93();this.$SphericalViewportControl26={x:this.$SphericalViewportControl28.x,y:this.$SphericalViewportControl28.y}};d.$SphericalViewportControl72=function(a){a===void 0&&(a={}),this.$SphericalViewportControl43=a.enableGyro||!1,this.$SphericalViewportControl44=a.slipFactor||0,this.$SphericalViewportControl47=a.springFactor||0,this.$SphericalViewportControl48=a.maxSpringDegrees||15,this.$SphericalViewportControl49=a.maxStretchXDegrees||20,this.$SphericalViewportControl50=a.maxStretchYDegrees||20,this.$SphericalViewportControl55=a.rubberBandConstant||0,this.$SphericalViewportControl54=a.enableRubberBanding||!1,this.$SphericalViewportControl67=a.enableZoomWithShiftKey||!1,this.$SphericalViewportControl68=a.enablePanningWithRightMouse||!1,this.$SphericalViewportControl60=a.disableAutoClientSizeUpdate||!1};d.reconfigure=function(a){this.$SphericalViewportControl71(a)};d.reconfigureControlConfig=function(a){a===void 0&&(a={}),this.$SphericalViewportControl72(a)};d.setEnableGyro=function(a){this.$SphericalViewportControl43=a};d.$SphericalViewportControl78=function(a){this.$SphericalViewportControl65&&this.$SphericalViewportControl94(),this.isListening(a.target)&&(this.$SphericalViewportControl19=!0,this.$SphericalViewportControl95(a))};d.$SphericalViewportControl87=function(a){this.$SphericalViewportControl62=!1,this.$SphericalViewportControl65&&this.$SphericalViewportControl94(),this.$SphericalViewportControl20?(this.$SphericalViewportControl96(a),this.$SphericalViewportControl20=!1):this.$SphericalViewportControl20=!0,this.$SphericalViewportControl95(a)};d.$SphericalViewportControl96=function(a){a.touches.length===2&&this.$SphericalViewportControl46&&(this.$SphericalViewportControl57=!0,this.$SphericalViewportControl58=this.$SphericalViewportControl97(a))};d.$SphericalViewportControl88=function(a){this.$SphericalViewportControl62=!0,this.$SphericalViewportControl57&&(this.$SphericalViewportControl98(a),this.$SphericalViewportControl46&&b("Event").kill(a))};d.$SphericalViewportControl98=function(a){a=this.$SphericalViewportControl97(a);var b=this.$SphericalViewportControl11*(this.$SphericalViewportControl58/a);b=b-this.$SphericalViewportControl11;this.$SphericalViewportControl99(b);this.$SphericalViewportControl58=a};d.$SphericalViewportControl97=function(a){var b=a.touches[0].pageX-a.touches[1].pageX;a=a.touches[0].pageY-a.touches[1].pageY;return Math.sqrt(Math.pow(b,2)+Math.pow(a,2))};d.$SphericalViewportControl89=function(a){this.$SphericalViewportControl62||(a.target.focus(a),this.$SphericalViewportControl83(a)),this.$SphericalViewportControl57?this.$SphericalViewportControl57=!1:this.$SphericalViewportControl20&&this.$SphericalViewportControl100(a)};d.$SphericalViewportControl95=function(a){this.emit("onMovementStart"),this.$SphericalViewportControl101(),this.$SphericalViewportControl102(a),this.$SphericalViewportControl103(a),this.$SphericalViewportControl68&&(a.which===3||a.button===2)&&(this.$SphericalViewportControl69=!0,this.$SphericalViewportControl15=!1),this.$SphericalViewportControl104(),a.preventDefault()};d.$SphericalViewportControl100=function(a){this.$SphericalViewportControl45&&!this.$SphericalViewportControl19&&(this.$SphericalViewportControl105(),this.$SphericalViewportControl45=!1)};d.$SphericalViewportControl106=function(a){this.$SphericalViewportControl65&&this.$SphericalViewportControl94()};d.$SphericalViewportControl107=function(a){this.$SphericalViewportControl103(a),this.$SphericalViewportControl14=!0,this.emit("updateViewportMove")};d.$SphericalViewportControl108=function(a){this.$SphericalViewportControl45&&(this.$SphericalViewportControl109(a),this.emit("updateViewportMove"))};d.$SphericalViewportControl101=function(){this.$SphericalViewportControl15=!1,this.$SphericalViewportControl45=!1,this.$SphericalViewportControl43=!1};d.$SphericalViewportControl110=function(a){this.$SphericalViewportControl103(a),this.$SphericalViewportControl111(),this.$SphericalViewportControl94(),this.$SphericalViewportControl105(),a.preventDefault()};d.$SphericalViewportControl94=function(a){var c=this;this.$SphericalViewportControl65=!1;b("queryThenMutateDOM")(function(){},function(){return c.$SphericalViewportControl32.style.cursor=""});this.$SphericalViewportControl20=!1;this.$SphericalViewportControl19=!1;this.$SphericalViewportControl69=!1;this.$SphericalViewportControl13.release();this.$SphericalViewportControl36&&(b("CSS").removeClass(this.$SphericalViewportControl10,this.$SphericalViewportControl36),this.$SphericalViewportControl36="")};d.$SphericalViewportControl112=function(a){if(this.$SphericalViewportControl20&&a.changedTouches)return a.changedTouches[0];else if(this.$SphericalViewportControl19)return a;else if(this.$SphericalViewportControl45)return a;return null};d.setMovementPosition=function(a){this.$SphericalViewportControl23=this.$SphericalViewportControl113(a)};d.$SphericalViewportControl113=function(a){a=this.$SphericalViewportControl112(a);return!a?this.$SphericalViewportControl23:{x:a.screenX,y:a.screenY}};d.$SphericalViewportControl114=function(a){a=this.$SphericalViewportControl112(a);return!a?this.$SphericalViewportControl24:{x:a.clientX,y:a.clientY}};d.$SphericalViewportControl102=function(a){__p&&__p();var c=this;this.$SphericalViewportControl65=!0;this.$SphericalViewportControl23=this.$SphericalViewportControl113(a);this.$SphericalViewportControl21={x:0,y:0};this.$SphericalViewportControl25=new(b("VelocityTracker"))();this.$SphericalViewportControl9=new(b("VelocityTracker"))(300);b("queryThenMutateDOM")(function(){},function(){return c.$SphericalViewportControl32.style.cursor=c.$SphericalViewportControl37});this.$SphericalViewportControl13.engage();a=this.$SphericalViewportControl10;this.$SphericalViewportControl20?this.$SphericalViewportControl13.addSubscriptions(b("Event").listen(a,"touchmove",function(a){return c.$SphericalViewportControl107(a)}),b("Event").listen(a,"touchend",function(a){return c.$SphericalViewportControl110(a)}),b("Event").listen(a,"touchcancel",function(a){return c.$SphericalViewportControl106(a)})):this.$SphericalViewportControl13.addSubscriptions(b("Event").listen(a,"mousemove",function(a){return c.$SphericalViewportControl107(a)}),b("Event").listen(a,"mouseup",function(a){return c.$SphericalViewportControl110(a)}),b("Event").listen(a,"mouseleave",function(a){return c.$SphericalViewportControl106(a)}))};d.$SphericalViewportControl109=function(a){this.$SphericalViewportControl115(a,this.$SphericalViewportControl44)};d.$SphericalViewportControl103=function(a){this.$SphericalViewportControl115(a,1)};d.reEnableGyro=function(){this.$SphericalViewportControl21={x:0,y:0},this.$SphericalViewportControl43=!0,this.$SphericalViewportControl45=!0,this.$SphericalViewportControl94()};d.$SphericalViewportControl115=function(a,b){var c=this.$SphericalViewportControl113(a),d=c.x-this.$SphericalViewportControl23.x,e=c.y-this.$SphericalViewportControl23.y,f=this.$SphericalViewportControl22?{x:0,y:0}:this.$SphericalViewportControl21;this.$SphericalViewportControl21={x:b*(c.x-this.$SphericalViewportControl23.x)+f.x,y:b*(c.y-this.$SphericalViewportControl23.y)+f.y};this.$SphericalViewportControl4.yaw+=d*this.$SphericalViewportControl5;this.$SphericalViewportControl4.pitch+=e*this.$SphericalViewportControl5;this.$SphericalViewportControl22=!1;this.$SphericalViewportControl23=c;this.$SphericalViewportControl25.update(c.x,c.y);this.$SphericalViewportControl24=this.$SphericalViewportControl114(a)};d.$SphericalViewportControl116=function(){var a=this.$SphericalViewportControl117(),b=-this.$SphericalViewportControl25.getVelocityX()*a;a=this.$SphericalViewportControl25.getVelocityY()*a;var c=this.$SphericalViewportControl45?this.$SphericalViewportControl44:1;this.$SphericalViewportControl118()&&(b=-b);return{x:b*c,y:a*c}};d.$SphericalViewportControl119=function(a,c){return b("radToDeg")(Math.atan(a/c))};d.$SphericalViewportControl120=function(a,b,c){return{x:this.$SphericalViewportControl119(a.x-this.$SphericalViewportControl34/2,c),y:-this.$SphericalViewportControl119(a.y-this.$SphericalViewportControl35/2,b)}};d.$SphericalViewportControl121=function(a,c){__p&&__p();var d={x:a.x-c.x,y:a.y-c.y},e=this.$SphericalViewportControl35/(2*Math.tan(b("degToRad")(this.getVerticalFieldOfView()/2))),f=e*Math.cos(b("degToRad")(this.$SphericalViewportControl26.y));f=f-(this.$SphericalViewportControl35/2-a.y)*Math.sin(b("degToRad")(this.$SphericalViewportControl26.y));if(this.$SphericalViewportControl26.y==-90&&c.y<0||this.$SphericalViewportControl26.y==90&&c.y>0){c=this.$SphericalViewportControl119(d.y-this.$SphericalViewportControl35/2,d.x-this.$SphericalViewportControl34/2);var g=this.$SphericalViewportControl119(a.y-this.$SphericalViewportControl35/2,a.x-this.$SphericalViewportControl34/2);g=g-c;g>90?g=180-g:g<-90&&(g=180+g);return{x:g*Math.sign(this.$SphericalViewportControl26.y),y:0}}else{c=this.$SphericalViewportControl120(d,e,f);g=this.$SphericalViewportControl120(a,e,f);return{x:c.x-g.x,y:c.y-g.y}}};d.$SphericalViewportControl118=function(){var a=this.$SphericalViewportControl33?this.$SphericalViewportControl33.top:b("getElementRect")(this.$SphericalViewportControl32).top;a=this.$SphericalViewportControl24.y-a;var c=this.$SphericalViewportControl35/(2*Math.tan(b("degToRad")(this.getVerticalFieldOfView()/2)));c=-c/Math.tan(b("degToRad")(this.$SphericalViewportControl26.y))+this.$SphericalViewportControl35/2;a=a>c&&this.$SphericalViewportControl26.y<0||a0;return a};d.$SphericalViewportControl111=function(){__p&&__p();if(this.$SphericalViewportControl69){var a={x:0,y:0};this.$SphericalViewportControl22||(this.$SphericalViewportControl22=!0,a.x=this.$SphericalViewportControl21.x/this.$SphericalViewportControl34,a.y=this.$SphericalViewportControl21.y/this.$SphericalViewportControl35);return a}a={x:0,y:0};if(!this.$SphericalViewportControl22){this.$SphericalViewportControl22=!0;var b=this.$SphericalViewportControl33,c=this.$SphericalViewportControl24.xb.right,e=this.$SphericalViewportControl24.yb.bottom;this.$SphericalViewportControl122(c,d,e,f);b={x:this.$SphericalViewportControl24.x-b.left,y:this.$SphericalViewportControl24.y-b.top};!c&&!d?a.x=this.$SphericalViewportControl121(b,this.$SphericalViewportControl21).x:a.x=-this.$SphericalViewportControl21.x*this.$SphericalViewportControl117()*s;!e&&!f?a.y=this.$SphericalViewportControl121(b,this.$SphericalViewportControl21).y:a.y=this.$SphericalViewportControl21.y*this.$SphericalViewportControl117()*s}this.$SphericalViewportControl9.updateVelocity(0,0);return this.$SphericalViewportControl123(a)};d.$SphericalViewportControl123=function(a){__p&&__p();if(!this.$SphericalViewportControl54||!this.$SphericalViewportControl42)return a;var b=this.$SphericalViewportControl26,c=b.x;b=b.y;var d=this.$SphericalViewportControl40,e=d.partialLeftDegrees,f=d.partialRightDegrees,g=d.partialTopDegrees;d=d.partialBottomDegrees;var h=a.x;a=a.y;var i=c+h;b=b+a;var j=!0,k=!0;if(this.$SphericalViewportControl63){var l=this.$SphericalViewportControl39.partialLeftDegrees,m=this.$SphericalViewportControl39.partialRightDegrees,n=this.$SphericalViewportControl41===0;(i<180&&h<0||i>180&&h>0)&&(i=c-h);(l!=null||!n)&&e!=null&&(j=e<0?(i<180?i+360:i)>360-e:i>360-e);(m!=null||!n)&&f!=null&&(k=f<0?(i<180?i+360:i)<360+f:(i>180?360-i:i)-d:!0}else{m=this.getVerticalFieldOfView();n=this.getHorizontalFieldOfView();var o=i<180?i+360:i;i=i>180?i-360:i;j=e!=null?o>360-e+n/2:!0;k=f!=null?i-d+m/2:!0}!j&&!k&&(h*=this.$SphericalViewportControl55);(!c||!l)&&(a*=this.$SphericalViewportControl55);return{x:h,y:a}};d.$SphericalViewportControl79=function(a,c){b("DOMEventListener").add(c,"wheel",this.$SphericalViewportControl90,{passive:!1}),this.emit("mouseEnter"),this.$SphericalViewportControl19?this.$SphericalViewportControl9=new(b("VelocityTracker"))(300):this.$SphericalViewportControl43&&this.$SphericalViewportControl44&&(this.$SphericalViewportControl9=new(b("VelocityTracker"))(300),this.$SphericalViewportControl45=!0,this.$SphericalViewportControl23=this.$SphericalViewportControl113(a),this.$SphericalViewportControl21={x:0,y:0},this.$SphericalViewportControl104())};d.$SphericalViewportControl80=function(a,c){b("DOMEventListener").remove(c,"wheel",this.$SphericalViewportControl90,{passive:!1}),this.emit("mouseLeave",a),this.$SphericalViewportControl100(a)};d.$SphericalViewportControl81=function(a){this.emit("mouseMove",a),this.$SphericalViewportControl43&&this.$SphericalViewportControl108(a)};d.$SphericalViewportControl82=function(a){this.emit("mouseUp",a)};d.$SphericalViewportControl83=function(a){__p&&__p();if(this.isListening(a.target)){a.target.focus();var c=b("Parent").bySelector(a.target,"._24cp");if(!this.$SphericalViewportControl14){this.emit("DOM/click",a);if(c)return!0}this.$SphericalViewportControl14=!1}return!1};d.$SphericalViewportControl99=function(a){a=this.setFieldOfView(this.$SphericalViewportControl11+a);a&&this.$SphericalViewportControl56()};d.disableKeyboard=function(){this.$SphericalViewportControl27=!0};d.enableKeyboard=function(){this.$SphericalViewportControl27=!1};d.$SphericalViewportControl84=function(a){a=this.$SphericalViewportControl125(a);if(a&&!this.$SphericalViewportControl27){this.$SphericalViewportControl17[a]=1;this.$SphericalViewportControl18||(this.$SphericalViewportControl18=!0,this.$SphericalViewportControl101(),this.$SphericalViewportControl104(),this.emit("updateViewportMove"));return!1}return!0};d.$SphericalViewportControl85=function(a){__p&&__p();a=this.$SphericalViewportControl125(a);if(a&&!this.$SphericalViewportControl27){this.$SphericalViewportControl17[a]=0;a=!1;for(var b in this.$SphericalViewportControl17)if(Object.prototype.hasOwnProperty.call(this.$SphericalViewportControl17,b)&&this.$SphericalViewportControl17[b]>0){a=!0;break}this.$SphericalViewportControl18=a;return!1}return!0};d.$SphericalViewportControl105=function(){var a=this.$SphericalViewportControl116();this.$SphericalViewportControl9=new(b("VelocityTracker"))(300,a)};d.$SphericalViewportControl104=function(){__p&&__p();var a=this;if(!this.$SphericalViewportControl15){this.$SphericalViewportControl60&&this.$SphericalViewportControl126();this.$SphericalViewportControl15=!0;this.$SphericalViewportControl8.updateVelocity(0,0);this.emit("updateViewportBegin",this.$SphericalViewportControl26.x,this.$SphericalViewportControl26.y);var c=this.once("updateViewportMove",function(){return a.emit("updateViewportMoveStart",a.$SphericalViewportControl45)});this.once("updateViewportEnd",function(){return c.remove()});this.$SphericalViewportControl59=b("performanceNow")();if(this.$SphericalViewportControl69){this.$SphericalViewportControl66&&cancelAnimationFrame(this.$SphericalViewportControl66);this.$SphericalViewportControl66=b("requestAnimationFrame")(this.$SphericalViewportControl127);return}this.$SphericalViewportControl66||(this.$SphericalViewportControl66=b("requestAnimationFrame")(this.$SphericalViewportControl128))}};d.$SphericalViewportControl126=function(){this.$SphericalViewportControl33=b("getElementRect")(this.$SphericalViewportControl32)};d.updateViewportClientSize=function(a){this.$SphericalViewportControl34=a.width,this.$SphericalViewportControl35=a.height};d.updateMinVFOV=function(a){this.$SphericalViewportControl51=Math.max(m,Math.min(n,a))};d.updateMaxVFOV=function(a){this.$SphericalViewportControl52=a};d.updateMaxHFOV=function(a){this.$SphericalViewportControl53=a};d.$SphericalViewportControl91=function(){this.$SphericalViewportControl33=b("getElementRect")(this.$SphericalViewportControl32),this.$SphericalViewportControl34=this.$SphericalViewportControl32.clientWidth||1,this.$SphericalViewportControl35=this.$SphericalViewportControl32.clientHeight||1};d.setAngularVelocityScaleFactor=function(a){this.$SphericalViewportControl64=a};d.$SphericalViewportControl130=function(){__p&&__p();var a=180,b=0,c=this.$SphericalViewportControl40,d=c.partialLeftDegrees;c=c.partialRightDegrees;d!=null&&c!=null&&(a=(c-d)/2+180);if(this.$SphericalViewportControl63){var e=this.$SphericalViewportControl39.partialLeftDegrees,f=this.$SphericalViewportControl39.partialRightDegrees,g=this.$SphericalViewportControl41===0;if((e!=null||!g)&&d!=null){e=d<0&&this.$SphericalViewportControl26.x<180?this.$SphericalViewportControl26.x+360:this.$SphericalViewportControl26.x;if(e>a){e=360-d-e;e>0&&(b=Math.min(e,this.$SphericalViewportControl48)*this.$SphericalViewportControl47)}}if((f!=null||!g)&&c!=null){e=c<0&&this.$SphericalViewportControl26.x>180?this.$SphericalViewportControl26.x-360:this.$SphericalViewportControl26.x;if(e180?this.$SphericalViewportControl26.x-360:this.$SphericalViewportControl26.x;if(d!=null&&c!=null&&d+c0?b=Math.min(h,this.$SphericalViewportControl48)*this.$SphericalViewportControl47:h<0&&(b=Math.max(h,-this.$SphericalViewportControl48)*this.$SphericalViewportControl47);return Math.abs(b)=a){h=360-d+g/2-e;h>0&&(b=Math.min(h,this.$SphericalViewportControl48)*this.$SphericalViewportControl47)}if(c!=null&&f<=a){d=c-g/2-f;d<0&&(b=Math.max(d,-this.$SphericalViewportControl48)*this.$SphericalViewportControl47)}}return Math.abs(b)c)return 0;b=(d-c)/2}if(d!=null&&this.$SphericalViewportControl26.y>b){var e=d-this.$SphericalViewportControl26.y;e<0&&(a=Math.max(e,-this.$SphericalViewportControl48)*this.$SphericalViewportControl47)}if(c!=null&&this.$SphericalViewportControl26.y0&&(a=Math.min(e,this.$SphericalViewportControl48)*this.$SphericalViewportControl47)}}else{b=this.getVerticalFieldOfView();if(c!=null&&d!=null&&c+d0?a=Math.min(e,this.$SphericalViewportControl48)*this.$SphericalViewportControl47:e<0&&(a=Math.max(e,-this.$SphericalViewportControl48)*this.$SphericalViewportControl47);return Math.abs(a)0&&(a=Math.min(d,this.$SphericalViewportControl48)*this.$SphericalViewportControl47)}}return Math.abs(a)=-i&&(m=Math.min(Math.abs((h+i)/2),this.$SphericalViewportControl50))),(c!=null||!e)&&f!=null&&(f<0?a=Math.max(a>180?a:a+360,360-f-l)%360:a>180&&(a=Math.max(a,360-f-l))),(d!=null||!e)&&g!=null&&(g<0?a=Math.min(a<180?a+360:a,360+g+l)%360:a<180&&(a=Math.min(a,g+l))),h!=null&&(i!=null&&h<0&&-h>i?b=Math.min(b,-i):b=Math.min(b,h+m)),i!=null&&(h!=null&&i<0&&h<-i?b=Math.max(b,h):b=Math.max(b,-i-m));else{this.$SphericalViewportControl54&&(l=this.$SphericalViewportControl49,m=this.$SphericalViewportControl50);if(f!=null&&g!=null&&f+g180?a-360:a;d=180?a:Math.min(a,g-k/2+l));if(h!=null&&i!=null&&h+if&&(f<0&&e<-f?o=e:o=-f,m=!0);o>e&&(e<0&&e<-f?o=-f:o=e,m=!0);j=((d-g)/2+180)%360;n>j&&360-n>g&&(n=360-g,m=!0);nd&&(n=d,m=!0)}else{k=b("calculateHFOVFromVFOV")(a,this.getAspectRatio());i&&a/2-o>f&&(o=a/2-f,m=!0);h&&o+a/2>e&&(o=e-a/2,m=!0);h&&i&&e+fj&&k/2+360-n>g&&(n=360+k/2-g,m=!0);nd&&(n=d-k/2,m=!0);g+dl){f.$9=!1;f.$6=c;f.$7=e;return}b("requestAnimationFrame")(function(){a(d)});h=b("easeInOutInterpolate")((h-g)/l);var i=d.deltaAlphaBG*h+d.startAlphaBG;h=d.deltaAlphaElement*h+d.startAlphaElement;f.$6=i;f.$7=h;f.draw(f.__getDrawData())},i=c-a,j=e-d;b("requestAnimationFrame")(function(){h({startAlphaBG:a,deltaAlphaBG:i,startAlphaElement:d,deltaAlphaElement:j})})};d.componentDidMount=function(){var a=this;this.props.isActive&&this.draw(this.__getDrawData());this.props.useNativeListeners&&(this.$12=new(b("SubscriptionsHandler"))(),this.$12.addSubscriptions(b("EventListener").listen(this.$4,"click",function(b){return a.__onClick(b)}),b("EventListener").listen(this.$4,"mouseover",function(){return a.$14(!0)}),b("EventListener").listen(this.$4,"mouseout",function(){return a.$14(!1,!1)})))};d.componentDidUpdate=function(){this.props.isActive&&this.draw(this.__getDrawData()),b("requestAnimationFrame")(this.$13)};d.componentWillUnmount=function(){this.$1=null,this.props.useNativeListeners&&this.$12.release()};d.render=function(){var a=this,c=this.$18(),d=this.props.isActive,e={};this.props.useNativeListeners||(e.onClick=function(b){return a.__onClick(b)},e.onMouseOver=function(){return a.$14(!0)},e.onMouseOut=function(){return a.$14(!1,!1)});return b("React").createElement("button",babelHelpers["extends"]({},e,{ref:function(b){return a.$4=b},className:"_17az sphericalHeadingIndicator"+(d?"":" hidden_elem"),style:{width:c.width,height:c.height}}),b("React").createElement("div",{className:"_17a-",ref:function(b){return a.$3=b}},b("React").createElement("canvas",{className:"_5nxw _17ay",ref:function(b){return a.$1=b}})))};return c}(b("React").Component);e.exports=a}),null); __d("SphericalVideoHeadingIndicator.react",["cx","fbt","BasicFBNux","React","SphericalMediaHeadingIndicator.react","SphericalPhotoPartialLimits","SphericalVideoExperiments","SphericalVideoHalfEquirectConfig","SphericalViewportControlStore","SubscriptionsHandler","XUIAmbientNUX.react"],(function(a,b,c,d,e,f,g,h){__p&&__p();var i=b("SphericalPhotoPartialLimits").makePartialLimits,j=4320,k=h._("You're watching only the best views from this 360 video. You can swipe or drag the video to watch it manually."),l=function(a){return a!==void 0&&a!==null},m=function(b){"use strict";__p&&__p();babelHelpers.inheritsLoose(a,b);function a(a){a=b.call(this,a)||this;l(a.__getDrawData().poiYaw)&&(a.__blinkStartTime=Date.now());return a}var c=a.prototype;c.__onClick=function(a){this.props.onClick(a)};c.__getDrawData=function(){return{fov:this.props.fov,initialYaw:this.props.initialYaw,pointerYaw:this.props.pointerYaw,poiYaw:this.props.poiYaw,yaw:this.props.yaw}};c.$SphericalHeadingIndicatorImpl1=function(a){return{fov:a.fov,initialYaw:a.initialYaw,pointerYaw:a.pointerYaw,poiYaw:a.poiYaw,yaw:a.yaw}};c.UNSAFE_componentWillReceiveProps=function(a){b.prototype.UNSAFE_componentWillReceiveProps.call(this,a);!l(this.props.poiYaw)&&l(a.poiYaw)&&(this.__blinkStartTime=Date.now());var c=a.isActive===this.props.isActive&&(a.initialYaw!==this.props.initialYaw||a.aspectRatio!==this.props.aspectRatio||a.fov!==this.props.fov||a.yaw!==this.props.yaw||a.pointerYaw!==this.props.pointerYaw||a.poiYaw!==this.props.poiYaw);c&&this.draw(this.$SphericalHeadingIndicatorImpl1(a))};c.shouldComponentUpdate=function(a){a=b.prototype.shouldComponentUpdate.call(this,a)||a.poiYaw!==this.props.poiYaw;return a};return a}(b("SphericalMediaHeadingIndicator.react"));m.__subClassMethods={__onClick:!0,__getDrawData:!0};a=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c){var d;d=a.call(this,c)||this;d.$6=!1;d.$1=c.controller;d.$5=c.isComposer;d.$5||(d.$3=j,d.$4=k);d.$2=new(b("SubscriptionsHandler"))();return d}var d=c.prototype;d.componentDidMount=function(){var a=this;this.$1.getOption("SphericalVideoPlayer","isReady")?this.$7():this.$2.addSubscriptions(this.$1.once("SphericalVideoPlayer/ready",function(){return a.$7()}))};d.componentWillUnmount=function(){this.$2.release()};d.$7=function(){__p&&__p();var a=this,c=this.$1.getVideoPlayerID();this.$2.addSubscriptions(this.$1.addListener("PhotoSnowlift/enterSnowlift",function(){return a.$8(!0)}),this.$1.addListener("PhotoSnowlift/exitSnowlift",function(){return a.$8(!1)}),this.$1.addListener("toggleFullscreen",function(){return a.$9()}),this.$1.addListener("beginPlayback",function(){return a.$10(!0)}),this.$1.addListener("finishPlayback",function(){return a.$10(!1)}),this.$1.addListener("VideoChannelController/enterChannel",function(){return a.$11(!0)}),this.$1.addListener("VideoChannelController/exitChannel",function(){return a.$11(!1)}),this.$1.addListener("TahoeController/enterTahoe",function(){return a.$12(!0)}),this.$1.addListener("TahoeController/exitTahoe",function(){return a.$12(!1)}),b("SphericalViewportControlStore").addListener(function(){var d=b("SphericalViewportControlStore"),e=d.getOrientation(c),f=e.pitch;e=e.yaw;a.setState({isActive:d.getViewportGrabbed(c),pitch:f,yaw:e,fov:d.getFieldOfView(c)})}),this.$1.addListener("SphericalVideoRecenterControl/animationStart",function(){return a.$13(!0)}),this.$1.addListener("SphericalVideoRecenterControl/animationEnd",function(){return a.$13(!1)}),this.$1.addListener("VideoControls/visibilityUpdate",function(b){b=b.areControlsVisible;return a.$13(b)}),this.$1.addListener("viewportChange",function(b,c){return a.forceUpdate()}),this.$1.addListener("VideoWithSphericalGuide/viewportChange",function(b){return a.setState({pointerYaw:b})}),this.$1.addListener("VideoWithSphericalGuide/intervalUpdate",function(b){return a.$14(b)}),this.$1.addListener("VideoWithSphericalGuide/toggle",function(b){return a.setState({isGuideAuto:b})}),this.$1.addListener("VideoWithSphericalGuide/stateToggle",function(b){b||a.setState({isGuideAuto:!1,poiYaw:void 0,pointerYaw:0})}));this.setState({isVisible:this.$1.isState("playing"),isActive:!1,inChannel:this.$1.getIsInChannel(),inSnowlift:this.$1.getOption("PhotoSnowlift","isInSnowlift"),inTahoe:this.$1.getSource()==="tahoe",inFullscreen:this.$1.isFullscreen(),isGuideAuto:this.$1.getOption("VideoWithSphericalGuide","auto"),showGuideNux:b("SphericalVideoExperiments").showGuideNux,pitch:b("SphericalViewportControlStore").getOrientation(c).pitch,yaw:b("SphericalViewportControlStore").getOrientation(c).yaw,fov:b("SphericalViewportControlStore").getFieldOfView(c)});this.$6=!0};d.$10=function(a){this.setState({isVisible:a})};d.$9=function(){this.setState({inFullscreen:this.$1.isFullscreen()})};d.$11=function(a){this.setState({inChannel:a})};d.$8=function(a){this.setState({inSnowlift:a})};d.$12=function(a){this.setState({inTahoe:a})};d.$13=function(a){this.setState({isActive:a})};d.$15=function(){this.setState({showGuideNux:!1}),b("BasicFBNux").onDismiss(j)};d.$14=function(a){var b=a.deltaPitch===0&&a.deltaYaw===0;a=b?void 0:a.baseYaw+a.deltaYaw;this.setState({poiYaw:a,isActive:!b})};d.render=function(){__p&&__p();var a=this;if(!this.$6)return null;var c=this.$1.getOption("SphericalVideoPlayer","getDimensions"),d=c.width;c=c.height;var e=!this.state.inChannel&&!this.state.inSnowlift&&!this.state.inFullscreen&&!this.state.inTahoe,f=this.$1.getOption("VideoWithSphericalGuide","enabled"),g;this.$5||(g=this.state.showGuideNux&&f);f={};var h=this.$1.getOption("SphericalVideoPlayer","getIsSingleFisheye");if(h){h=this.$1.getOption("SphericalVideoPlayer","getOriginalFOV");h!==null&&h!==0&&(f.partialLimits=i({partialLeftDegrees:h/2,partialRightDegrees:h/2,partialTopDegrees:0,partialBottomDegrees:0}))}h=this.$1.getOption("SphericalVideoPlayer","getIsHalfEquirectangular");h&&(f.partialLimits=i(b("SphericalVideoHalfEquirectConfig").getHalfEquirectangularPartialLimits()));return b("React").createElement("div",{className:"_3ldo"+(e?" _42a0":"")+(this.state.inTahoe?" _4l1h":"")+(this.state.inFullscreen?" _70uh":"")},b("React").createElement(m,babelHelpers["extends"]({ref:"compass",aspectRatio:d/c,initialYaw:this.props.initialYaw,isActive:this.state.isVisible,fov:this.state.fov,pitch:this.state.pitch,yaw:this.state.yaw,onClick:this.props.onClick,useLargeHeadingIndicator:this.state.inFullscreen,isPanning:this.state.isActive,isGuideAuto:this.state.isGuideAuto,pointerYaw:this.state.pointerYaw,poiYaw:this.state.poiYaw},f)),b("React").createElement(b("XUIAmbientNUX.react"),{contextRef:function(){return a.refs.compass},shown:g,position:"left",onCloseButtonClick:function(){return a.$15()}},this.$4))};return c}(b("React").Component);e.exports=a}),null); __d("SphericalVideoPerformanceTracker",["MovingAverage","SphericalMediaPerformanceTypedLogger","Visibility","performance"],(function(a,b,c,d,e,f){__p&&__p();var g=b("MovingAverage").MovingAverage;a=60;c=1e3;var h=10*c,i=15,j=c/a;d=function(){"use strict";__p&&__p();function a(){__p&&__p();var c=this;a.$1=!1;this.$10=new g(500,j);this.$11=new(b("SphericalMediaPerformanceTypedLogger"))();this.$12=!1;this.$7=-1;this.$8=-1;this.$5=!1;this.$6=!1;var d=function(){c.$4=!1,c.$16()},e=function(){c.$4=!0};b("Visibility").isHidden()?d():e();b("Visibility").addListener(b("Visibility").HIDDEN,d);b("Visibility").addListener(b("Visibility").VISIBLE,e)}a.get=function(){a.$2||(a.$2=new a());return a.$2};var c=a.prototype;c.addFrameAtTime=function(b){__p&&__p();if(!this.$4)return;if(b!==this.$9){a.$1=!0;this.$9=b;if(!this.$3)this.$3=b;else{var c=b-this.$3;this.$3=b;this.$10.add(c);this.$12||(this.$17(),this.$12=!0)}}};c.setProjection=function(a){this.$15=a;return this};c.trackSpatialAudioMetrics=function(){this.$5=!0,this.$14=0};c.isTrackingSpatialAudioMetrics=function(){return this.$5};c.addAudioStutter=function(){this.isTrackingSpatialAudioMetrics()||this.trackSpatialAudioMetrics(),this.$14++};c.enterSpatialAudioFallback=function(){this.isTrackingSpatialAudioMetrics()||this.trackSpatialAudioMetrics(),this.$7=b("performance").now()};c.exitSpatialAudioFallback=function(){this.isTrackingSpatialAudioMetrics()||this.trackSpatialAudioMetrics();if(this.$7>0){var a=Math.trunc(b("performance").now()-this.$7);this.$7=-1;this.$11.setProductName("spatial_audio").setEvent("audio_fallback").setFallbackDuration(a).setFallbackReason("channel").log();this.$11.clear()}};c.trackSphericalRendererMetrics=function(){this.$6=!0};c.isTrackingSphericalRendererMetrics=function(){return this.$6};c.isOne360VideoActive=function(){return a.$1};c.enterSphericalRendererSetup=function(){this.isTrackingSphericalRendererMetrics()||this.trackSphericalRendererMetrics(),this.$8=b("performance").now()};c.exitSphericalRendererSetup=function(){this.isTrackingSphericalRendererMetrics()||this.trackSphericalRendererMetrics();if(this.$8>0){var a=Math.trunc(b("performance").now()-this.$8);this.$8=-1;this.$11.setProductName("spherical_video").setEvent("spherical_renderer_setup").setProjection(this.$15).setSphericalRendererSetupDuration(a).log();this.$11.clear()}};c.log=function(){__p&&__p();if(!this.isOne360VideoActive())return;else{var a=Math.trunc(this.$18()*Math.pow(10,i));this.$11.setProductName("spherical_video").setEvent("snapshot").setNormalizedFrameTime(a);this.$15&&this.$11.setProjection(this.$15);this.$5&&(this.$11.setProductName("spatial_audio").setNumSpatialAudioStutters(this.$14),this.$14=0);this.$11.log();this.$11.clear()}this.$16()};c.destroy=function(){clearInterval(this.$13),a.$2=null};c.$18=function(){return this.$10.getAvg()/j};c.$16=function(){this.$3=null,a.$1=!1};c.$17=function(){this.$13=setInterval(this.log.bind(this),h)};return a}();e.exports=d}),null); __d("SphericalMediaCanvasPool",["DOM"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=1,h="default",i=function(a,b){return a+b};a=function(){__p&&__p();function a(){this.$2=new Map(),this.$3=new Map(),this.$1=null}var c=a.prototype;c.setLimit=function(a,b){b===void 0&&(b=h);var c=this.$3.get(b)||{queue:[],limit:1};c.limit=a;this.$3.set(b,c)};c.release=function(a,b){__p&&__p();b===void 0&&(b=h);a=i(a,b);var c=this.$2.get(a);if(!c)return!1;b=this.$3.get(b);if(!b||b.queue.length===0)return!1;b.queue.splice(b.queue.indexOf(a),1);c.canvas.parentNode&&c.canvas.parentNode.removeChild(c.canvas);return this.$2["delete"](a)};c.get=function(a,c,d){__p&&__p();d===void 0&&(d=h);var e=babelHelpers["extends"]({},c.canvasAttrs);if(!a||!c.beforeCanvasLost)throw new Error("Missing required arguments.");var f=i(a,d);e["data-id"]=e["data-id"]||a;a=this.$2.get(f);if(a)return a.canvas;a=this.$3.get(d)||{queue:[],limit:g};var j;if(a.queue.length>2&1,g=a[e]>>1&1,h=a[e]>>0&1;d.push(f*2-1);d.push(g*2-1);d.push(h*2-1)}this.$SphericalRenderer22=this.$SphericalRenderer6.createBuffer();this.$SphericalRenderer6.bindBuffer(this.$SphericalRenderer6.ARRAY_BUFFER,this.$SphericalRenderer22);this.$SphericalRenderer6.bufferData(this.$SphericalRenderer6.ARRAY_BUFFER,new Float32Array(d),this.$SphericalRenderer6.STATIC_DRAW);this.$SphericalRenderer22&&(this.$SphericalRenderer22.itemSize=3,this.$SphericalRenderer22.numItems=d.length/3);if(!this.$SphericalRenderer19){var i;f=[];if(this.$SphericalRenderer9){g=this.$SphericalRenderer15.image.videoWidth/2;b=g/(Math.floor(g/32)*32);h=(1-1/b)/2;e=3;d=2;g=1/d;i=1/e}else h=(1-1/b)/2,e=2,d=3,g=1/d,i=1/e;for(var b=0;b.5?1:0}}for(d=0;d<12;++d){e=0;for(var i=0;i<8;++i)e+=this.$SphericalRenderer25.bitmask[1+d*8+i]*Math.pow(2,i);this.$SphericalRenderer25.dataView.setUint8(d,e)}this.$SphericalRenderer25.offsetX=this.$SphericalRenderer25.dataView.getFloat32(0,!0);this.$SphericalRenderer25.offsetZ=-this.$SphericalRenderer25.dataView.getFloat32(8,!0)};e.$SphericalRenderer44=function(){try{this.$SphericalRenderer25.ready||(this.$SphericalRenderer25.pixels=new Uint8Array(3840*4),this.$SphericalRenderer25.bitmask=new Uint8Array(33*3),this.$SphericalRenderer25.dataView=new DataView(new ArrayBuffer(12)),this.$SphericalRenderer25.ready=!0),this.$SphericalRenderer25.framebuffer||this.$SphericalRenderer41(),this.$SphericalRenderer42(),this.$SphericalRenderer43()}catch(a){this.emit("renderingError",a)}};e.$SphericalRenderer45=function(){if(this.$SphericalRenderer19)this.$SphericalRenderer46();else{this.$SphericalRenderer6.bindTexture(this.$SphericalRenderer6.TEXTURE_2D,this.$SphericalRenderer15);this.$SphericalRenderer6.pixelStorei(this.$SphericalRenderer6.UNPACK_FLIP_Y_WEBGL,!this.$SphericalRenderer7);try{this.$SphericalRenderer6.texImage2D(this.$SphericalRenderer6.TEXTURE_2D,0,this.$SphericalRenderer6.RGBA,this.$SphericalRenderer6.RGBA,this.$SphericalRenderer6.UNSIGNED_BYTE,this.$SphericalRenderer15.image)}catch(a){this.emit("renderingError",a)}this.$SphericalRenderer8&&this.$SphericalRenderer44()}};e.renderWithRotationMatrix=function(a){if(this.$SphericalRenderer3)return;this.$SphericalRenderer18&&this.$SphericalRenderer45();this.$SphericalRenderer12=a;this.$SphericalRenderer7&&h.rotateY(this.$SphericalRenderer12,this.$SphericalRenderer12,g.toRadian(-90));this.$SphericalRenderer47()};e.render=function(a,b){if(this.$SphericalRenderer3)return;this.$SphericalRenderer18&&this.$SphericalRenderer45();this.$SphericalRenderer9?(h.identity(this.$SphericalRenderer12),h.rotateX(this.$SphericalRenderer12,this.$SphericalRenderer12,g.toRadian(-b)),h.rotateY(this.$SphericalRenderer12,this.$SphericalRenderer12,g.toRadian(a-135)),h.rotateZ(this.$SphericalRenderer12,this.$SphericalRenderer12,g.toRadian(45))):(this.$SphericalRenderer7&&(a-=90),h.identity(this.$SphericalRenderer12),h.rotateX(this.$SphericalRenderer12,this.$SphericalRenderer12,-g.toRadian(b)),h.rotateY(this.$SphericalRenderer12,this.$SphericalRenderer12,g.toRadian(a)));this.$SphericalRenderer47()};e.$SphericalRenderer47=function(){__p&&__p();if(this.$SphericalRenderer19)this.$SphericalRenderer22===null&&this.$SphericalRenderer40(this.$SphericalRenderer2.projectionType,this.$SphericalRenderer2.expansionCoef||0,0);else{this.$SphericalRenderer26||(this.$SphericalRenderer37(),this.$SphericalRenderer6.activeTexture(this.$SphericalRenderer6.TEXTURE0));var a=this.$SphericalRenderer15.image.videoWidth;this.$SphericalRenderer2.projectionType==="cubemap"||this.$SphericalRenderer2.projectionType==="rotated_cubemap"?a in this.$SphericalRenderer20||this.$SphericalRenderer40(this.$SphericalRenderer2.projectionType,this.$SphericalRenderer2.expansionCoef||0,a):this.$SphericalRenderer2.projectionType==="barrel"?a in this.$SphericalRenderer20||this.$SphericalRenderer39(this.$SphericalRenderer2.expansionCoef||1.01,a):this.$SphericalRenderer7?a in this.$SphericalRenderer20||this.$SphericalRenderer38(a,40,40,Math.PI/180*111,Math.PI/180*142,-Math.PI/2):a in this.$SphericalRenderer20||this.$SphericalRenderer38(a);this.$SphericalRenderer7||(this.$SphericalRenderer6.bindBuffer(this.$SphericalRenderer6.ARRAY_BUFFER,this.$SphericalRenderer20[a]),this.$SphericalRenderer6.vertexAttribPointer(this.$SphericalRenderer16.textureCoordAttribute,this.$SphericalRenderer20[a].itemSize,this.$SphericalRenderer6.FLOAT,!1,0,0))}this.$SphericalRenderer6.uniform1i(this.$SphericalRenderer16.samplerUniform,0);this.$SphericalRenderer6.bindBuffer(this.$SphericalRenderer6.ARRAY_BUFFER,this.$SphericalRenderer22);this.$SphericalRenderer22&&this.$SphericalRenderer6.vertexAttribPointer(this.$SphericalRenderer16.vertexPositionAttribute,this.$SphericalRenderer22.itemSize,this.$SphericalRenderer6.FLOAT,!1,0,0);this.$SphericalRenderer6.bindBuffer(this.$SphericalRenderer6.ELEMENT_ARRAY_BUFFER,this.$SphericalRenderer21);this.$SphericalRenderer6.uniformMatrix4fv(this.$SphericalRenderer16.pMatrixUniform,!1,this.$SphericalRenderer11);this.$SphericalRenderer10&&this.$SphericalRenderer6.uniform2f(this.$SphericalRenderer16.boundariesUniform,j,k);this.$SphericalRenderer7?(h.invert(this.$SphericalRenderer13,this.$SphericalRenderer12),this.$SphericalRenderer6.uniformMatrix4fv(this.$SphericalRenderer16.mvMatrixUniform,!1,this.$SphericalRenderer13),this.$SphericalRenderer8&&this.$SphericalRenderer6.uniform2f(this.$SphericalRenderer16.offsetUniform,this.$SphericalRenderer25.offsetX,this.$SphericalRenderer25.offsetZ)):this.$SphericalRenderer6.uniformMatrix4fv(this.$SphericalRenderer16.mvMatrixUniform,!1,this.$SphericalRenderer12);this.$SphericalRenderer10&&this.$SphericalRenderer6.uniformMatrix4fv(this.$SphericalRenderer16.stMatrixUniform,!1,this.$SphericalRenderer14);this.$SphericalRenderer21&&this.$SphericalRenderer6.drawElements(this.$SphericalRenderer6.TRIANGLES,this.$SphericalRenderer21.numItems,this.$SphericalRenderer6.UNSIGNED_SHORT,0)};e.$SphericalRenderer48=function(){var a=this.$SphericalRenderer6.getParameter(this.$SphericalRenderer6.MAX_CUBE_MAP_TEXTURE_SIZE),b=this.$SphericalRenderer15.image.width;return Math.min(a,b)};e.$SphericalRenderer46=function(){var a=this.$SphericalRenderer48(),c=this.$SphericalRenderer15.image.width,d=b("DOM").create("canvas",{width:a,height:a});d=d.getContext("2d");this.$SphericalRenderer6.bindTexture(this.$SphericalRenderer6.TEXTURE_CUBE_MAP,this.$SphericalRenderer15);this.$SphericalRenderer6.pixelStorei(this.$SphericalRenderer6.UNPACK_FLIP_Y_WEBGL,!1);for(var e=0;e<6;e++){d.drawImage(this.$SphericalRenderer15.image,0,e*c,c,c,0,0,a,a);var f=new Uint8Array(d.getImageData(0,0,a,a).data);this.$SphericalRenderer6.texImage2D(this.$SphericalRenderer6.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,this.$SphericalRenderer6.RGBA,a,a,0,this.$SphericalRenderer6.RGBA,this.$SphericalRenderer6.UNSIGNED_BYTE,f)}};return d}(b("EventEmitter"));e.exports=c}),null); __d("SphericalVideoPlayer",["cx","invariant","Arbiter","Banzai","CSS","DOM","DOMDimensions","Event","FullScreen","SphericalMediaCanvasPool","SphericalParallaxUtils","SphericalRenderer","SphericalVideoComponentActions","SphericalVideoComponentDispatcher","SphericalVideoHalfEquirectConfig","SphericalVideoPerformanceTracker","SphericalVideoPlayerEvents","SphericalViewportControl","SubscriptionsHandler","VideoPlayerReasonTransitionHelper","forwardEvent","getElementRect","getFullScreenElement","getViewportDimensions","gkx","onViewportChanged","requestAnimationFrame","uniqueID","SphericalViewportControlStore","VideoPlayerControllerStore"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("SphericalParallaxUtils").calculateYawOffset,j="SphericalVideoPlayer";c=2;var k=1e3;d=.8;f=16;g=15;var l=d/f/g,m=50,n=.1;b("SphericalMediaCanvasPool").setLimit(c,j);d=function(){__p&&__p();function c(a,c){__p&&__p();var d=this;this.$48=function(){var a=!!d.$1.getOption("VideoWithSphericalGuide","auto");if(d.$1.getSource()!=="inline"||a)return;a=d.$55();if(a===null)return;typeof a==="number"||h(0,1207);d.$26=a;d.$29&&(d.$24=d.$12.getOrientation().x-d.$26,d.$25=d.$26,d.$29=!1)};this.$50=function(){d.$1.isState("paused")||d.$1.pause("spherical_switch_canvas"),d.$57(),d.$46()};this.$54=function(a){__p&&__p();if(!d.$14)return;var c=d.$14,e=d.$30?a-d.$30:0;e=d.$56(e);e&&d.$36(d.$24+d.$25,null);if(d.$2.readyState>=d.$2.HAVE_CURRENT_DATA&&(d.$44()||d.$7||e)){b("SphericalVideoPerformanceTracker").get().setProjection(d.$10.projectionType).addFrameAtTime(a);d.$7=!1;e=d.$12.getOrientation();c.render(e.x+90,e.y);d.$16&&(d.$16.remove(),d.$16=null)}d.$30=a;b("requestAnimationFrame")(d.$54)};this.$33=function(a,b){d.$12.setRelativeSphericalOrientation(a,b)};this.$36=function(a,b){d.$12.setSphericalOrientation(a,b)};this.$37=function(a){d.$14&&(d.$14.updateFieldOfView(a),d.$12.setFieldOfView(a),d.$20=a,d.$32())};this.$38=function(a){d.$14&&(d.$10.projectionType=a,d.$14.reconfigure(d.$2,d.$10,!0),d.$32())};this.$39=function(a){d.$14&&(d.$10.stereoFormat=a,d.$14.reconfigure(d.$2,d.$10,!0),d.$32())};this.$40=function(a){d.$12&&(d.$10.partialLimits=a,d.$12.reconfigure(d.$10),d.$32())};this.$41=function(a){a===void 0&&(a={}),d.$12&&(d.$12.reconfigureControlConfig(a),d.$32())};this.$34=function(a,c){if(b("FullScreen").isFullScreen()&&(a=0?(a+180)%360-180:(a-180)%360+180;d.$59(a,b);d.$19.yaw=a;d.$19.pitch=b;d.$20=c;d.$14&&d.$14.updateFieldOfView(c);d.$58(a);d.$32()};this.$10=a;this.$11=Object.assign({viewportClassName:"_2a6s",canvasClassName:"_38vt",placeholderImgClassName:"_44h9",videoID:"",playerID:void 0,eagerPreload:void 0,preventScrollDefaultAction:void 0,useViewportDimension:void 0,useContainerDimensions:void 0},c);this.$22=0;this.$28=!0;this.$29=!1}var d=c.prototype;d.enable=function(c){__p&&__p();var d=this;if(this.$1)return;this.$1=c;if(typeof a.WebGLRenderingContext!=="function"&&typeof a.WebGL2RenderingContext!=="function"){this.$31({error:"SPHERICAL_SETUP_FAILED",message:"WebGLRenderingContext not available."});return}if(!b("gkx")("678912")){this.$31({error:"SPHERICAL_RENDER_ERROR",message:"Unsupported browser version"});return}var e=c.getVideoNode();e instanceof HTMLVideoElement||h(0,1208);this.$2=e;this.$7=!1;this.$18=!0;this.$8=new(b("SubscriptionsHandler"))();this.$8.addSubscriptions(b("Event").listen(this.$2,"loadeddata",function(){return d.$32()}),b("Event").listen(this.$2,"seeked",function(){return d.$32()}),b("Event").listen(this.$2,"ended",function(){return d.$33(0,0)}),b("Event").listen(window,"resize",function(){b("FullScreen").isFullScreen()&&d.$1.getContainerNode()===b("getFullScreenElement")()&&d.$34(window.innerWidth,window.innerHeight)}),c.addListener("stateChange",function(){(c.isState("destroyed")||c.isState("fallback")&&(c.isLiveVideo()||!c.isFallbackRecoverable()))&&d.$35()}),c.addListener("VideoPlayerFallbackEvents/recover",function(){d.$35(),b("CSS").removeClass(d.$2,"_3axk"),d.$1.play(new(b("VideoPlayerReasonTransitionHelper"))("spherical_fallback"))}),c.addListener(b("SphericalVideoPlayerEvents").SET_ABSOLUTE_SPHERICAL_ORIENTATION,this.$36),c.addListener(b("SphericalVideoPlayerEvents").SET_RELATIVE_SPHERICAL_ORIENTATION,this.$33),c.addListener(b("SphericalVideoPlayerEvents").SET_FIELD_OF_VIEW,this.$37),c.addListener(b("SphericalVideoPlayerEvents").SET_VIDEO_PROJECTION,this.$38),c.addListener(b("SphericalVideoPlayerEvents").SET_STEREO_MODE,this.$39),c.addListener(b("SphericalVideoPlayerEvents").SET_PARTIAL_LIMITS,this.$40),c.addListener(b("SphericalVideoPlayerEvents").SET_VIEWPORT_CONTROL_CONFIG,this.$41),c.addListener("dimensionsChange",this.$34),c.once("changeVolume",function(){return d.$18=!1}),c.once("muteVideo",function(){return d.$18=!1}),c.once("unmuteVideo",function(){return d.$18=!1}),c.addListener("toggleFullscreen",function(){return d.$4.focus()}),c.addListener("TahoeController/enterTahoe",function(){d.$4.focus(),d.$12.setEnableZoom(!0),d.$23=!0,d.$1.emit("SphericalVideoPlayer/zoomEnabled")}),c.addListener("TahoeController/exitTahoe",function(){d.$4.focus(),d.$12.setEnableZoom(!1),d.$23=!1,d.$1.emit("SphericalVideoPlayer/zoomDisabled")}));if(this.$11.useContainerDimensions){var f=c.getContainerNode();this.$5=b("DOMDimensions").getElementDimensions(f)}else this.$5=b("DOMDimensions").getElementDimensions(e),(this.$5.width===0||this.$5.height===0)&&(this.$5={width:e.width,height:e.height});this.$15=this.$1.getVideoPlayerID()||b("uniqueID")();this.$19={yaw:this.$10.initialHeading,pitch:this.$10.initialPitch};this.$20=this.$10.fieldOfView;this.$23=!1;f=c.getVideoProjection();f&&(this.$10.projectionType=f);b("CSS").addClass(e,"_3axk");this.$42();c.registerOption("SphericalVideoPlayer","getDimensions",function(){return d.$11.useViewportDimension?d.$6:d.$5});c.registerOption("SphericalVideoPlayer","isReady",function(){return!!d.$14});c.registerOption("SphericalVideoPlayer","getScreenshotDataURL",function(){return d.$43()});c.registerOption("SphericalVideoPlayer","getIsSingleFisheye",function(){return d.$10.isSingleFisheye&&d.$10.originalFOV!==null});c.registerOption("SphericalVideoPlayer","getOriginalFOV",function(){return d.$10.originalFOV});c.registerOption("SphericalVideoPlayer","getEnableZoom",function(){return d.$23});c.registerOption("SphericalVideoPlayer","getIsHalfEquirectangular",function(){return d.$10.projectionType==="half_equirectangular"});this.$44()||this.$11.eagerPreload?this.$45():this.$46()};d.disable=function(){this.$35()};d.$45=function(){__p&&__p();if(this.$1.getOption("SphericalVideoPlayer","isUnavailable"))return;this.$17&&(this.$17.remove(),this.$17=null);try{b("SphericalVideoPerformanceTracker").get().setProjection(this.$10.projectionType).enterSphericalRendererSetup(),this.$47(),b("SphericalVideoPerformanceTracker").get().exitSphericalRendererSetup()}catch(a){this.$31({error:"SPHERICAL_SETUP_FAILED",message:a.message});return}this.$1.setStillFrameEnabled(!1);this.$32();this.$1.emit("SphericalVideoPlayer/ready");var a=this.$12.getOrientation().x;this.$28?this.$24=a:this.$29=!0;this.$27=b("onViewportChanged")(this.$48);this.$28=!1};d.$46=function(){var a=this;this.$17=this.$1.addListener("stateChange",function(){a.$44()&&a.$45()})};d.$49=function(){if(!this.$14)return;var a=this.$43();a=b("DOM").create("img",{width:this.$5.width,height:this.$5.height,src:a,className:this.$11.placeholderImgClassName});b("DOM").insertAfter(this.$2,a);this.$16&&this.$16.remove();this.$16=a;this.$50()};d.$43=function(a,b){if(!this.$14)return"";var c=this.$14,d=this.$12.getOrientation(),e=d.x;d=d.y;return c.getScreenshotDataURL(e+90,d,a,b)};d.$42=function(){__p&&__p();var a=this,c=b("DOM").create("div",{className:this.$11.viewportClassName,tabIndex:0}),d={};if(this.$10.isSingleFisheye&&this.$10.originalFOV){var e=this.$10.originalFOV/2;this.$10.partialLimits={partialLeftDegrees:e,partialRightDegrees:e,partialTopDegrees:e,partialBottomDegrees:e};d=this.$51()}this.$10.projectionType==="half_equirectangular"&&(this.$10.partialLimits=b("SphericalVideoHalfEquirectConfig").getHalfEquirectangularPartialLimits(),d=b("SphericalVideoHalfEquirectConfig").getHalfEquirectangularControllerConfig());b("SphericalVideoComponentDispatcher").explicitlyRegisterStores([b("SphericalViewportControlStore"),b("VideoPlayerControllerStore")]);var f=new(b("SphericalViewportControl"))(c,this.$10,d);this.$8.addSubscriptions(f.addListener("DOM/click",function(b){if(b.button!==0)return;a.$1.clickVideo();b.preventDefault()}),f.addListener("mouseMove",function(b){a.$1.mouseMove(b),b.preventDefault()}),f.addListener("mouseUp",function(b){a.$1.mouseUp(b),b.preventDefault()}),f.addListener("mouseLeave",function(b){a.$1.mouseLeave(b),b.preventDefault()}),f.addListener("updateViewportBegin",function(){a.$1.isMuted()&&a.$18&&(a.$18=!1,a.$1.unmute()),a.$1.logEvent("viewport_rotated")}));this.$8.addSubscriptions(f.addListener("viewportChange",this.$52));e=["DOM/click","updateViewportBegin","updateViewportMove","updateViewportEnd","wheelScroll","viewportChange"];this.$8.addSubscriptions.apply(this.$8,e.map(function(c){return b("forwardEvent")(f,a.$1,c)}));this.$12=f;b("Arbiter").subscribe("VideoChannelView/opened",function(){a.$21=!0,a.$12.disableKeyboard()});b("Arbiter").subscribe("VideoChannelView/closed",function(){a.$21=!1,a.$12.enableKeyboard()});b("FullScreen").subscribe("changed",function(){b("FullScreen").isFullScreen()?a.$12.enableKeyboard():a.$21&&a.$12.disableKeyboard()});this.$11.preventScrollDefaultAction&&this.$12.setPreventScrollDefaultAction(!0);b("SphericalVideoComponentActions").registerSphericalViewportControl(this.$1.getVideoPlayerID(),this.$12,this.$4);this.$1.registerOption("SphericalVideoPlayer","getCurrentViewport",function(){return a.$19});this.$1.registerOption("SphericalVideoPlayer","getFieldOfView",function(){return a.$20});this.$4=c;b("DOM").insertAfter(this.$2,c);this.$11.useViewportDimension&&(this.$6=b("DOMDimensions").getElementDimensions(c))};d.$47=function(){__p&&__p();var a=this,c={canvasAttrs:{width:this.$5.width,height:this.$5.height,className:this.$11.canvasClassName,tabIndex:0},beforeCanvasLost:function(){return a.$49()}};c=b("SphericalMediaCanvasPool").get(this.$15,c,j);var d=new(b("SphericalRenderer"))(this.$2,c,this.$10);this.$9=new(b("SubscriptionsHandler"))();this.$9.addSubscriptions(d.addListener("renderingError",function(b){return a.$31({error:"SPHERICAL_RENDER_ERROR",message:b.message})}),d.addListener("renderingContextLost",this.$50));this.$3=c;this.$14=d;b("DOM").insertAfter(this.$2,c);this.$53(d,this.$5.width,this.$5.height);b("requestAnimationFrame")(this.$54);b("CSS").show(c)};d.$55=function(){__p&&__p();var a=this.$1.getRootNode();if(!a)return null;a=b("getElementRect")(a);a=a.top+a.bottom/2;var c=b("getViewportDimensions").withoutScrollbars().height;a=a/c*100;c=this.$12.getHorizontalFieldOfView();a=i(a,null,null,c);c=a.yaw;a=a.success;return a?c:null};d.$56=function(a){__p&&__p();if(typeof this.$26!=="number")return!1;typeof this.$25!=="number"&&(this.$25=0);var b=Math.abs(this.$25-this.$26);if(b=k){this.$22=d;var e=!!this.$1.getOption("VideoWithSphericalGuide","auto");b("Banzai").post("spherical_video_viewport",{video_fbid:this.$1.getVideoID(),yaw_degrees:a,pitch_degrees:c,roll_degrees:0,field_of_view_y:this.$10.fieldOfView,aspect_ratio:this.$5.height/this.$5.width,video_player_position:this.$2.currentTime,video_player_position_ms:this.$2.currentTime*1e3,guide_enabled:e,timestamp:d})}};d.$57=function(){this.$14&&(this.$14.destroy(),this.$14=null,this.$27&&this.$27.remove(),this.$27=null,this.$9.release(),this.$3.remove())};d.$35=function(){this.$1.hasOption("SphericalVideoPlayer","isUnavailable")||this.$1.registerOption("SphericalVideoPlayer","isUnavailable",function(){return!0}),this.$8&&this.$8.release(),this.$57(),this.$12&&this.$12.destroy(),this.$13&&this.$13.destroy(),this.$4&&this.$4.remove(),b("SphericalVideoPerformanceTracker").get().destroy()};d.$51=function(){return{disableAutoClientSizeUpdate:!1,enableGyro:!1,enableRubberBanding:!1,maxSpringDegrees:0,maxStretchXDegrees:0,maxStretchYDegrees:0,minVFOV:3,rubberBandConstant:0,slipFactor:0,springFactor:0,enableZoomWithShiftKey:!1,enablePanningWithRightMouse:!1}};return c}();e.exports=d}),null); __d("SphericalVideoRecenterControl",["SubscriptionsHandler","easeInOutInterpolate","requestAnimationFrame"],(function(a,b,c,d,e,f){__p&&__p();var g=1e3;a=function(){"use strict";__p&&__p();function a(a,b,c){var d=this;this.$2=a;this.$1=!1;this.$6=this.$9.bind(this);this.$5={yaw:b,pitch:c};this.$4={yaw:b,pitch:c};a.getOption("SphericalVideoPlayer","isReady")?this.$10():a.once("SphericalVideoPlayer/ready",function(){return d.$10()})}var c=a.prototype;c.$10=function(){var a=this;this.$8=new(b("SubscriptionsHandler"))();this.$8.addSubscriptions(this.$2.addListener("updateViewportBegin",function(){return a.$11()}),this.$2.addListener("SphericalHeadingIndicator/click",function(){return a.$12()}),this.$2.addListener("VideoWithSphericalGuide/intervalUpdate",function(b){return a.updateTargetViewport(b.baseYaw+b.deltaYaw,b.basePitch+b.deltaPitch)}),this.$2.addListener("VideoWithSphericalGuide/stateToggle",function(b){b||(a.$5.yaw=a.$4.yaw,a.$5.pitch=a.$4.pitch)}),this.$2.addListener("SphericalVideoViewportTagComment/click",function(b){return a.$12(b)}))};c.updateTargetViewport=function(a,b){this.$5.yaw=a,this.$5.pitch=b};c.$12=function(a){__p&&__p();if(this.$1||this.$2.getOption("VideoWithSphericalGuide","enabled")&&this.$2.isState("playing"))return;this.$1=!0;this.$3=Date.now();var c=this.$2.getOption("SphericalVideoPlayer","getCurrentViewport");a=a||this.$5;var d=a.yaw-c.yaw;Math.abs(d)>180&&(d=d>0?d-360:d+360);this.$7={basePitch:c.pitch,deltaPitch:a.pitch-c.pitch,baseYaw:c.yaw,deltaYaw:d};this.$2.emit("SphericalVideoRecenterControl/animationStart");b("requestAnimationFrame")(this.$6)};c.$11=function(){this.$1=!1};c.$9=function(){__p&&__p();if(!this.$1){this.$2.emit("SphericalVideoRecenterControl/animationEnd");return}var a=Date.now();if(a-this.$3>g){this.$13(this.$7,1);this.$1=!1;this.$2.emit("SphericalVideoRecenterControl/animationEnd");return}b("requestAnimationFrame")(this.$6);this.$13(this.$7,b("easeInOutInterpolate")((a-this.$3)/g))};c.$13=function(a,b){var c=a.deltaPitch*b+a.basePitch;b=a.deltaYaw*b+a.baseYaw;this.$2.setSphericalOrientation(b,c)};c.destroy=function(){this.$8.release()};return a}();e.exports=a}),null); __d("VideoSphericalHeadingIndicator",["cx","CSS","React","ReactDOM","SphericalVideoHeadingIndicator.react","destroyOnUnload"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=function(){__p&&__p();function a(a,c,d,e,f,g){__p&&__p();var h=this;g===void 0&&(g=!1);this.$7=function(a){a.preventDefault(),h.$1.emit("SphericalHeadingIndicator/click"),h.$1.logEvent("heading_reset")};this.$1=a;this.$2=c;this.$3=d;this.$4=g;var i=a.addListener("VideoPlayerFallbackEvents/enter",function(){i.remove(),b("ReactDOM").unmountComponentAtNode(c)});if(a.isState("ready")||a.isState("playing"))this.$5();else var j=a.addListener("stateChange",function(){(h.$1.isState("ready")||h.$1.isState("playing"))&&(j.remove(),h.$5())});b("destroyOnUnload")(function(){b("ReactDOM").unmountComponentAtNode(c)})}var c=a.prototype;c.$5=function(){this.$1.addListener("toggleFullscreen",this.$6.bind(this)),b("ReactDOM").render(b("React").createElement(b("SphericalVideoHeadingIndicator.react"),{initialYaw:this.$3,onClick:this.$7,controller:this.$1,isComposer:this.$4}),this.$2)};c.$6=function(){this.$1.isFullscreen()?b("CSS").addClass(this.$2,"_4ubd"):b("CSS").removeClass(this.$2,"_4ubd")};return a}();e.exports=a}),null); __d("AutoScheduleUtils",["DateConsts","DateTime","Instant","Timezone","TimezoneNamesData","formatDate"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g="D, M j, Y",h="g:i A";e.exports={tzNamesModule:null,capitalize:function(a){return a.split(/ /g).map(function(a){return""+a.substring(0,1).toUpperCase()+a.substring(1)}).join(" ")},isFunction:function(a){return typeof a==="function"},getTimeStrWithFormat:function(a,c){c===void 0&&(c=h);return b("formatDate")(a,c)},getDateStrWithFormat:function(a,c){c===void 0&&(c=g);return b("formatDate")(a,c)},getTimeSlotDateStr:function(a){return this.getDateStrWithFormat(a.start_time)},getTimeSlotTimeStr:function(a){var b=this.getTimeStrWithFormat(a.start_time);a=this.getTimeStrWithFormat(a.end_time);return b+" - "+a},getTimeSlotStr:function(a,b){a={start_time:a,end_time:b};b=this.getTimeSlotDateStr(a);a=this.getTimeSlotTimeStr(a);return b+" "+a},getTimestampStr:function(a,c){return this.getTimeSlotStr(a,a+(c||b("DateConsts").SEC_PER_HOUR/2))},isWeekend:function(a){return a.getDay()===b("DateConsts").DAYS.SATURDAY||a.getDay()===b("DateConsts").DAYS.SUNDAY},deltaWeekDaysFromDeltaBusinessDays:function(a,b){if(b<=0)return 0;var c=0;for(var d=1;d0;return{firstSlotStart:b?a[0].start_time:-1,lastSlotStart:b?a[a.length-1].start_time:-1,numSlots:a.length}},setupTimezoneNamesModule:function(){this.tzNamesModule||(this.tzNamesModule=b("Timezone").registerNamesModule(b("TimezoneNamesData")))},getTimezoneString:function(){this.setupTimezoneNamesModule();return b("Timezone").getExactName(b("Timezone").getEnvironmentTimezoneID())},convertDateToTimezone:function(a,c){var d=b("Timezone").getEnvironmentTimezoneID();c=this.getTimezoneID(c);if(c!==null){d=b("DateTime").create(a,d).getParallel(c).getUnixTimestamp();return Math.floor(d/b("DateConsts").MS_PER_SEC)}else return a}}}),null); __d("moment.instagram",[],(function(a,b,c,d,e,f){__p&&__p();(function(c){__p&&__p();var d,g="2.9.0",h=typeof a!=="undefined"&&(typeof window==="undefined"||window===a.window)?a:this,i,j=Math.round,k=Object.prototype.hasOwnProperty,l,m=0,n=1,o=2,p=3,q=4,r=5,s=6,t={},u=[],aa=typeof e!=="undefined"&&e&&e.exports,ba=/^\/?Date\((\-?\d+)/i,ca=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,da=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,v=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,w=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ea=/\d\d?/,fa=/\d{1,3}/,ga=/\d{1,4}/,ha=/[+\-]?\d{1,6}/,ia=/\d+/,ja=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,x=/Z|[\+\-]\d\d:?\d\d/gi,ka=/T/i,la=/[\+\-]?\d+/,ma=/[\+\-]?\d+(\.\d{1,3})?/,na=/\d/,oa=/\d\d/,pa=/\d{3}/,qa=/\d{4}/,ra=/[+-]?\d{6}/,sa=/[+-]?\d+/,ta=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ua="YYYY-MM-DDTHH:mm:ssZ",y=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],z=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],va=/([\+\-]|\d\d)/gi;"Date|Hours|Minutes|Seconds|Milliseconds".split("|");var wa={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},xa={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},ya={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},A={},B={s:45,m:45,h:22,d:26,M:11},za="DDD w W M D d".split(" "),Aa="M D H h m s w W".split(" "),C={M:function(){return this.month()+1},MMM:function(a){return this.localeData().monthsShort(this,a)},MMMM:function(a){return this.localeData().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.localeData().weekdaysMin(this,a)},ddd:function(a){return this.localeData().weekdaysShort(this,a)},dddd:function(a){return this.localeData().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return M(this.year()%100,2)},YYYY:function(){return M(this.year(),4)},YYYYY:function(){return M(this.year(),5)},YYYYYY:function(){var a=this.year(),b=a>=0?"+":"-";return b+M(Math.abs(a),6)},gg:function(){return M(this.weekYear()%100,2)},gggg:function(){return M(this.weekYear(),4)},ggggg:function(){return M(this.weekYear(),5)},GG:function(){return M(this.isoWeekYear()%100,2)},GGGG:function(){return M(this.isoWeekYear(),4)},GGGGG:function(){return M(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return Q(this.milliseconds()/100)},SS:function(){return M(Q(this.milliseconds()/10),2)},SSS:function(){return M(this.milliseconds(),3)},SSSS:function(){return M(this.milliseconds(),3)},Z:function(){var a=this.utcOffset(),b="+";a<0&&(a=-a,b="-");return b+M(Q(a/60),2)+":"+M(Q(a)%60,2)},ZZ:function(){var a=this.utcOffset(),b="+";a<0&&(a=-a,b="-");return b+M(Q(a/60),2)+M(Q(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},Ba={},Ca=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"],D=!1;function E(a,b,c){switch(arguments.length){case 2:return a!=null?a:b;case 3:return a!=null?a:b!=null?b:c;default:throw new Error("Implement me")}}function F(a,b){return k.call(a,b)}function G(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function Da(a){d.suppressDeprecationWarnings===!1&&typeof console!=="undefined"&&emptyFunction}function H(a,b){var c=!0;return K(function(){c&&(Da(a),c=!1);return b.apply(this,arguments)},b)}function Ea(a,b){Ba[a]||(Da(b),Ba[a]=!0)}function c(a,b){return function(c){return M(a.call(this,c),b)}}function Fa(a,b){return function(c){return this.localeData().ordinal(a.call(this,c),b)}}function Ga(a,b){var c=(b.year()-a.year())*12+(b.month()-a.month()),d=a.clone().add(c,"months"),e,f;b-d<0?(e=a.clone().add(c-1,"months"),f=(b-d)/(d-e)):(e=a.clone().add(c+1,"months"),f=(b-d)/(e-d));return-(c+f)}while(za.length)l=za.pop(),C[l+"o"]=Fa(C[l],l);while(Aa.length)l=Aa.pop(),C[l+l]=c(C[l],2);C.DDDD=c(C.DDD,3);function Ha(a,b,c){__p&&__p();if(c==null)return b;if(a.meridiemHour!=null)return a.meridiemHour(b,c);else if(a.isPM!=null){a=a.isPM(c);a&&b<12&&(b+=12);!a&&b===12&&(b=0);return b}else return b}function Ia(){}function I(a,b){b!==!1&&Ua(a),Ja(this,a),this._d=new Date(+a._d),D===!1&&(D=!0,d.updateOffset(this),D=!1)}function J(a){a=Pa(a);var b=a.year||0,c=a.quarter||0,e=a.month||0,f=a.week||0,g=a.day||0,h=a.hour||0,i=a.minute||0,j=a.second||0;a=a.millisecond||0;this._milliseconds=+a+j*1e3+i*6e4+h*36e5;this._days=+g+f*7;this._months=+e+c*3+b*12;this._data={};this._locale=d.localeData();this._bubble()}function K(b,c){for(var a in c)F(c,a)&&(b[a]=c[a]);F(c,"toString")&&(b.toString=c.toString);F(c,"valueOf")&&(b.valueOf=c.valueOf);return b}function Ja(b,c){__p&&__p();var a,d,e;typeof c._isAMomentObject!=="undefined"&&(b._isAMomentObject=c._isAMomentObject);typeof c._i!=="undefined"&&(b._i=c._i);typeof c._f!=="undefined"&&(b._f=c._f);typeof c._l!=="undefined"&&(b._l=c._l);typeof c._strict!=="undefined"&&(b._strict=c._strict);typeof c._tzm!=="undefined"&&(b._tzm=c._tzm);typeof c._isUTC!=="undefined"&&(b._isUTC=c._isUTC);typeof c._offset!=="undefined"&&(b._offset=c._offset);typeof c._pf!=="undefined"&&(b._pf=c._pf);typeof c._locale!=="undefined"&&(b._locale=c._locale);if(u.length>0)for(a in u)d=u[a],e=c[d],typeof e!=="undefined"&&(b[d]=e);return b}function L(a){if(a<0)return Math.ceil(a);else return Math.floor(a)}function M(a,b,c){var d=""+Math.abs(a);a=a>=0;while(d.length=0?b=Math.floor(a):b=Math.ceil(a));return b}function R(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function Ra(a,b,c){return Y(d([a,11,31+b-c]),b,c).week}function Sa(a){return Ta(a)?366:365}function Ta(a){return a%4===0&&a%100!==0||a%400===0}function Ua(a){var b;a._a&&a._pf.overflow===-2&&(b=a._a[n]<0||a._a[n]>11?n:a._a[o]<1||a._a[o]>R(a._a[m],a._a[n])?o:a._a[p]<0||a._a[p]>24||a._a[p]===24&&(a._a[q]!==0||a._a[r]!==0||a._a[s]!==0)?p:a._a[q]<0||a._a[q]>59?q:a._a[r]<0||a._a[r]>59?r:a._a[s]<0||a._a[s]>999?s:-1,a._pf._overflowDayOfYear&&(bo)&&(b=o),a._pf.overflow=b)}function Va(a){a._isValid==null&&(a._isValid=!isNaN(a._d.getTime())&&a._pf.overflow<0&&!a._pf.empty&&!a._pf.invalidMonth&&!a._pf.nullInput&&!a._pf.invalidFormat&&!a._pf.userInvalidated,a._strict&&(a._isValid=a._isValid&&a._pf.charsLeftOver===0&&a._pf.unusedTokens.length===0&&a._pf.bigHour===void 0));return a._isValid}function Wa(a){return a?a.toLowerCase().replace("_","-"):a}function Xa(b){__p&&__p();var a=0,c,d,e,f;while(a0){e=Ya(f.slice(0,c).join("-"));if(e)return e;if(d&&d.length>=c&&Oa(f,d,!0)>=c-1)break;c--}a++}return null}function Ya(a){return t[a]}function S(a,b){var c;if(b._isUTC){b=b.clone();c=(d.isMoment(a)||O(a)?+a:+d(a))-+b;b._d.setTime(+b._d+c);d.updateOffset(b,!1);return b}else return d(a).local()}K(Ia.prototype,{set:function(b){var c,a;for(a in b)c=b[a],typeof c==="function"?this[a]=c:this["_"+a]=c;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(b,c,e){__p&&__p();var a,f;this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]);for(a=0;a<12;a++){f=d.utc([2e3,a]);e&&!this._longMonthsParse[a]&&(this._longMonthsParse[a]=new RegExp("^"+this.months(f,"").replace(".","")+"$","i"),this._shortMonthsParse[a]=new RegExp("^"+this.monthsShort(f,"").replace(".","")+"$","i"));!e&&!this._monthsParse[a]&&(f="^"+this.months(f,"")+"|^"+this.monthsShort(f,""),this._monthsParse[a]=new RegExp(f.replace(".",""),"i"));if(e&&c==="MMMM"&&this._longMonthsParse[a].test(b))return a;else if(e&&c==="MMM"&&this._shortMonthsParse[a].test(b))return a;else if(!e&&this._monthsParse[a].test(b))return a}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(b){var a,c;this._weekdaysParse||(this._weekdaysParse=[]);for(a=0;a<7;a++){this._weekdaysParse[a]||(c=d([2e3,1]).day(a),c="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[a]=new RegExp(c.replace(".",""),"i"));if(this._weekdaysParse[a].test(b))return a}},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b);return b},isPM:function(a){return(a+"").toLowerCase().charAt(0)==="p"},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){if(a>11)return c?"pm":"PM";else return c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b,c){a=this._calendar[a];return typeof a==="function"?a.apply(b,[c]):a},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return typeof e==="function"?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){a=this._relativeTime[a>0?"future":"past"];return typeof a==="function"?a(b):a.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(a){return a},postformat:function(a){return a},week:function(a){return Y(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},firstDayOfWeek:function(){return this._week.dow},firstDayOfYear:function(){return this._week.doy},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}});function Za(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function $a(b){var c=b.match(v),a,d;for(a=0,d=c.length;a=0&&w.test(b))b=b.replace(w,d),w.lastIndex=0,a-=1;return b}function bb(a,b){__p&&__p();var c=b._strict;switch(a){case"Q":return na;case"DDDD":return pa;case"YYYY":case"GGGG":case"gggg":return c?qa:ga;case"Y":case"G":case"g":return sa;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return c?ra:ha;case"S":if(c)return na;case"SS":if(c)return oa;case"SSS":if(c)return pa;case"DDD":return fa;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return ja;case"a":case"A":return b._locale._meridiemParse;case"x":return la;case"X":return ma;case"Z":case"ZZ":return x;case"T":return ka;case"SSSS":return ia;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return c?oa:ea;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return ea;case"Do":return c?b._locale._ordinalParse:b._locale._ordinalParseLenient;default:c=new RegExp(hb(gb(a.replace("\\","")),"i"));return c}}function U(a){a=a||"";a=a.match(x)||[];a=a[a.length-1]||[];a=(a+"").match(va)||["-",0,0];var b=+(a[1]*60)+Q(a[2]);return a[0]==="+"?b:-b}function cb(a,b,c){__p&&__p();var e,f=c._a;switch(a){case"Q":b!=null&&(f[n]=(Q(b)-1)*3);break;case"M":case"MM":b!=null&&(f[n]=Q(b)-1);break;case"MMM":case"MMMM":e=c._locale.monthsParse(b,a,c._strict);e!=null?f[n]=e:c._pf.invalidMonth=b;break;case"D":case"DD":b!=null&&(f[o]=Q(b));break;case"Do":b!=null&&(f[o]=Q(parseInt(b.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":b!=null&&(c._dayOfYear=Q(b));break;case"YY":f[m]=d.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":f[m]=Q(b);break;case"a":case"A":c._meridiem=b;break;case"h":case"hh":c._pf.bigHour=!0;case"H":case"HH":f[p]=Q(b);break;case"m":case"mm":f[q]=Q(b);break;case"s":case"ss":f[r]=Q(b);break;case"S":case"SS":case"SSS":case"SSSS":f[s]=Q(("0."+b)*1e3);break;case"x":c._d=new Date(Q(b));break;case"X":c._d=new Date(parseFloat(b)*1e3);break;case"Z":case"ZZ":c._useUTC=!0;c._tzm=U(b);break;case"dd":case"ddd":case"dddd":e=c._locale.weekdaysParse(b);e!=null?(c._w=c._w||{},c._w.d=e):c._pf.invalidWeekday=b;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2);b&&(c._w=c._w||{},c._w[a]=Q(b));break;case"gg":case"GG":c._w=c._w||{},c._w[a]=d.parseTwoDigitYear(b)}}function db(a){var b,c,e,f,g,h;b=a._w;b.GG!=null||b.W!=null||b.E!=null?(g=1,h=4,c=E(b.GG,a._a[m],Y(d(),1,4).year),e=E(b.W,1),f=E(b.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,c=E(b.gg,a._a[m],Y(d(),g,h).year),e=E(b.w,1),b.d!=null?(f=b.d,fSa(d)&&(a._pf._overflowDayOfYear=!0),d=X(d,0,a._dayOfYear),a._a[n]=d.getUTCMonth(),a._a[o]=d.getUTCDate());for(d=0;d<3&&a._a[d]==null;++d)a._a[d]=b[d]=c[d];for(;d<7;d++)a._a[d]=b[d]=a._a[d]==null?d===2?1:0:a._a[d];a._a[p]===24&&a._a[q]===0&&a._a[r]===0&&a._a[s]===0&&(a._nextDay=!0,a._a[p]=0);a._d=(a._useUTC?X:nb).apply(null,b);a._tzm!=null&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm);a._nextDay&&(a._a[p]=24)}function eb(a){var b;if(a._d)return;b=Pa(a._i);a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond];V(a)}function fb(a){var b=new Date();if(a._useUTC)return[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()];else return[b.getFullYear(),b.getMonth(),b.getDate()]}function W(b){__p&&__p();if(b._f===d.ISO_8601){jb(b);return}b._a=[];b._pf.empty=!0;var c=""+b._i,a,e,f,g,h,i=c.length,j=0;f=ab(b._f,b._locale).match(v)||[];for(a=0;a0&&b._pf.unusedInput.push(h),c=c.slice(c.indexOf(e)+e.length),j+=e.length),C[g]?(e?b._pf.empty=!1:b._pf.unusedTokens.push(g),cb(g,e,b)):b._strict&&!e&&b._pf.unusedTokens.push(g);b._pf.charsLeftOver=i-j;c.length>0&&b._pf.unusedInput.push(c);b._pf.bigHour===!0&&b._a[p]<=12&&(b._pf.bigHour=void 0);b._a[p]=Ha(b._locale,b._a[p],b._meridiem);V(b);Ua(b)}function gb(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function hb(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ib(b){__p&&__p();var c,d,e,a,f;if(b._f.length===0){b._pf.invalidFormat=!0;b._d=new Date(NaN);return}for(a=0;a0;f[4]=c;return pb.apply({},f)}function Y(a,b,c){b=c-b;c=c-a.day();c>b&&(c-=7);cd?7:0)-(f0?a:a-1,dayOfYear:f>0?f:Sa(a-1)+f}}function sb(a){__p&&__p();var b=a._i,c=a._f;a._locale=a._locale||d.localeData(a._l);if(b===null||c===void 0&&b==="")return d.invalid({nullInput:!0});typeof b==="string"&&(a._i=b=a._locale.preparse(b));if(d.isMoment(b))return new I(b,!0);else c?N(c)?ib(a):W(a):mb(a);b=new I(a);b._nextDay&&(b.add(1,"d"),b._nextDay=void 0);return b}d=function(a,b,c,d){__p&&__p();var e;typeof c==="boolean"&&(d=c,c=void 0);e={};e._isAMomentObject=!0;e._i=a;e._f=b;e._l=c;e._strict=d;e._isUTC=!1;e._pf=G();return sb(e)};d.suppressDeprecationWarnings=!1;d.createFromInputFallback=H("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))});function tb(b,c){var e,a;c.length===1&&N(c[0])&&(c=c[0]);if(!c.length)return d();e=c[0];for(a=1;a=0;--l)Qa(Ca[l]);d.normalizeUnits=function(a){return P(a)};d.invalid=function(a){var b=d.utc(NaN);a!=null?K(b._pf,a):b._pf.userInvalidated=!0;return b};d.parseZone=function(){return d.apply(null,arguments).parseZone()};d.parseTwoDigitYear=function(a){return Q(a)+(Q(a)>68?1900:2e3)};d.isDate=O;K(d.fn=I.prototype,{clone:function(){return d(this)},valueOf:function(){return+this._d-(this._offset||0)*6e4},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=d(this).utc();if(00:!1},parsingFlags:function(){return K({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.utcOffset(0,a)},local:function(a){this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(this._dateUtcOffset(),"m"));return this},format:function(a){a=T(this,a||d.defaultFormat);return this.localeData().postformat(a)},add:Ma(1,"add"),subtract:Ma(-1,"subtract"),diff:function(a,b,c){a=S(a,this);var d=(a.utcOffset()-this.utcOffset())*6e4,e;b=P(b);b==="year"||b==="month"||b==="quarter"?(e=Ga(this,a),b==="quarter"?e=e/3:b==="year"&&(e=e/12)):(a=this-a,e=b==="second"?a/1e3:b==="minute"?a/6e4:b==="hour"?a/36e5:b==="day"?(a-d)/864e5:b==="week"?(a-d)/6048e5:a);return c?e:L(e)},from:function(a,b){return d.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(d(),a)},calendar:function(a){a=a||d();var b=S(a,this).startOf("day");b=this.diff(b,"days",!0);b=b<-6?"sameElse":b<-1?"lastWeek":b<0?"lastDay":b<1?"sameDay":b<2?"nextDay":b<7?"nextWeek":"sameElse";return this.format(this.localeData().calendar(b,this,d(a)))},isLeapYear:function(){return Ta(this.year())},isDST:function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();if(a!=null){a=ob(a,this.localeData());return this.add(a-b,"d")}else return b},month:$("Month",!0),startOf:function(a){__p&&__p();a=P(a);switch(a){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}a==="week"?this.weekday(0):a==="isoWeek"&&this.isoWeekday(1);a==="quarter"&&this.month(Math.floor(this.month()/3)*3);return this},endOf:function(a){a=P(a);return a===void 0||a==="millisecond"?this:this.startOf(a).add(1,a==="isoWeek"?"week":a).subtract(1,"ms")},isAfter:function(a,b){b=P(typeof b!=="undefined"?b:"millisecond");if(b==="millisecond"){a=d.isMoment(a)?a:d(a);return+this>+a}else{a=d.isMoment(a)?+a:+d(a);return a<+this.clone().startOf(b)}},isBefore:function(a,b){b=P(typeof b!=="undefined"?b:"millisecond");if(b==="millisecond"){a=d.isMoment(a)?a:d(a);return+this<+a}else{a=d.isMoment(a)?+a:+d(a);return+this.clone().endOf(b)this?this:a}),zone:H("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(a,b){if(a!=null){typeof a!=="string"&&(a=-a);this.utcOffset(a,b);return this}else return-this.utcOffset()}),utcOffset:function(a,b){__p&&__p();var c=this._offset||0,e;if(a!=null){typeof a==="string"&&(a=U(a));Math.abs(a)<16&&(a=a*60);!this._isUTC&&b&&(e=this._dateUtcOffset());this._offset=a;this._isUTC=!0;e!=null&&this.add(e,"m");c!==a&&(!b||this._changeInProgress?Na(this,d.duration(a-c,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,d.updateOffset(this,!0),this._changeInProgress=null));return this}else return this._isUTC?c:this._dateUtcOffset()},isLocal:function(){return!this._isUTC},isUtcOffset:function(){return this._isUTC},isUtc:function(){return this._isUTC&&this._offset===0},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){this._tzm?this.utcOffset(this._tzm):typeof this._i==="string"&&this.utcOffset(U(this._i));return this},hasAlignedHourOffset:function(a){!a?a=0:a=d(a).utcOffset();return(this.utcOffset()-a)%60===0},daysInMonth:function(){return R(this.year(),this.month())},dayOfYear:function(a){var b=j((d(this).startOf("day")-d(this).startOf("year"))/864e5)+1;return a==null?b:this.add(a-b,"d")},quarter:function(a){return a==null?Math.ceil((this.month()+1)/3):this.month((a-1)*3+this.month()%3)},weekYear:function(a){var b=Y(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return a==null?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=Y(this,1,4).year;return a==null?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return a==null?b:this.add((a-b)*7,"d")},isoWeek:function(a){var b=Y(this,1,4).week;return a==null?b:this.add((a-b)*7,"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return a==null?b:this.add(a-b,"d")},isoWeekday:function(a){return a==null?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return Ra(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return Ra(this.year(),a.dow,a.doy)},get:function(a){a=P(a);return this[a]()},set:function(a,b){var c;if(typeof a==="object")for(c in a)this.set(c,a[c]);else a=P(a),typeof this[a]==="function"&&this[a](b);return this},locale:function(a){if(a===void 0)return this._locale._abbr;else{a=d.localeData(a);a!=null&&(this._locale=a);return this}},lang:H("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){if(a===void 0)return this.localeData();else return this.locale(a)}),localeData:function(){return this._locale},_dateUtcOffset:function(){return-Math.round(this._d.getTimezoneOffset()/15)*15}});function ub(a,b){var c;if(typeof b==="string"){b=a.localeData().monthsParse(b);if(typeof b!=="number")return a}c=Math.min(a.date(),R(a.year(),b));a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c);return a}function Z(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function vb(a,b,c){if(b==="Month")return ub(a,c);else return a._d["set"+(a._isUTC?"UTC":"")+b](c)}function $(a,b){return function(c){if(c!=null){vb(this,a,c);d.updateOffset(this,b);return this}else return Z(this,a)}}d.fn.millisecond=d.fn.milliseconds=$("Milliseconds",!1);d.fn.second=d.fn.seconds=$("Seconds",!1);d.fn.minute=d.fn.minutes=$("Minutes",!1);d.fn.hour=d.fn.hours=$("Hours",!0);d.fn.date=$("Date",!0);d.fn.dates=H("dates accessor is deprecated. Use date instead.",$("Date",!0));d.fn.year=$("FullYear",!0);d.fn.years=H("years accessor is deprecated. Use year instead.",$("FullYear",!0));d.fn.days=d.fn.day;d.fn.months=d.fn.month;d.fn.weeks=d.fn.week;d.fn.isoWeeks=d.fn.isoWeek;d.fn.quarters=d.fn.quarter;d.fn.toJSON=d.fn.toISOString;d.fn.isUTC=d.fn.isUtc;function wb(a){return a*400/146097}function xb(a){return a*146097/400}K(d.duration.fn=J.prototype,{_bubble:function(){__p&&__p();var a=this._milliseconds,b=this._days,c=this._months,d=this._data,e=0;d.milliseconds=a%1e3;a=L(a/1e3);d.seconds=a%60;a=L(a/60);d.minutes=a%60;a=L(a/60);d.hours=a%24;b+=L(a/24);e=L(wb(b));b-=L(xb(e));c+=L(b/30);b%=30;e+=L(c/12);c%=12;d.days=b;d.months=c;d.years=e},abs:function(){__p&&__p();this._milliseconds=Math.abs(this._milliseconds);this._days=Math.abs(this._days);this._months=Math.abs(this._months);this._data.milliseconds=Math.abs(this._data.milliseconds);this._data.seconds=Math.abs(this._data.seconds);this._data.minutes=Math.abs(this._data.minutes);this._data.hours=Math.abs(this._data.hours);this._data.months=Math.abs(this._data.months);this._data.years=Math.abs(this._data.years);return this},weeks:function(){return L(this.days()/7)},valueOf:function(){return this._milliseconds+this._days*864e5+this._months%12*2592e6+Q(this._months/12)*31536e6},humanize:function(a){var b=qb(this,!a,this.localeData());a&&(b=this.localeData().pastFuture(+this,b));return this.localeData().postformat(b)},add:function(a,b){a=d.duration(a,b);this._milliseconds+=a._milliseconds;this._days+=a._days;this._months+=a._months;this._bubble();return this},subtract:function(a,b){a=d.duration(a,b);this._milliseconds-=a._milliseconds;this._days-=a._days;this._months-=a._months;this._bubble();return this},get:function(a){a=P(a);return this[a.toLowerCase()+"s"]()},as:function(a){__p&&__p();var b,c;a=P(a);if(a==="month"||a==="year"){b=this._days+this._milliseconds/864e5;c=this._months+wb(b)*12;return a==="month"?c:c/12}else{b=this._days+Math.round(xb(this._months/12));switch(a){case"week":return b/7+this._milliseconds/6048e5;case"day":return b+this._milliseconds/864e5;case"hour":return b*24+this._milliseconds/36e5;case"minute":return b*24*60+this._milliseconds/6e4;case"second":return b*24*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(b*24*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+a)}}},lang:d.fn.lang,locale:d.fn.locale,toIsoString:H("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return!this.asSeconds()?"P0D":(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":"")},localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}});d.duration.fn.toString=d.duration.fn.toISOString;function yb(a){d.duration.fn[a]=function(){return this._data[a]}}for(l in wa)F(wa,l)&&yb(l.toLowerCase());d.duration.fn.asMilliseconds=function(){return this.as("ms")};d.duration.fn.asSeconds=function(){return this.as("s")};d.duration.fn.asMinutes=function(){return this.as("m")};d.duration.fn.asHours=function(){return this.as("h")};d.duration.fn.asDays=function(){return this.as("d")};d.duration.fn.asWeeks=function(){return this.as("weeks")};d.duration.fn.asMonths=function(){return this.as("M")};d.duration.fn.asYears=function(){return this.as("y")};d.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10;b=Q(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th";return a+b}});function zb(a){if(typeof ender!=="undefined")return;i=h.moment;a?h.moment=H("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",d):h.moment=d}aa?e.exports=d:typeof define==="function"&&define.amd?(define(function(a,g,c){c.config&&c.config()&&c.config().noGlobal===!0&&(h.moment=i);return d}),zb(!0)):zb()}).call(this)}),null);